]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dvb_psi_pmt: Don't recognize extension descriptor as AC-4 audio
authorMichael Kuron <1748330+mkuron@users.noreply.github.com>
Sat, 16 Aug 2025 10:45:51 +0000 (12:45 +0200)
committerFlole <Flole998@users.noreply.github.com>
Wed, 20 Aug 2025 19:50:47 +0000 (21:50 +0200)
src/input/mpegts/dvb.h
src/input/mpegts/dvb_psi_pmt.c

index 311e27cd514ad7664e3c791184415cf2b6468666..4749f790e97cb0547d517e03cbf52f952868b321 100644 (file)
@@ -167,7 +167,7 @@ struct lang_str;
 #define DVB_DESC_CRID                 0x76
 #define DVB_DESC_EAC3                 0x7A
 #define DVB_DESC_AAC                  0x7C
-#define DVB_DESC_AC4                  0x7F
+#define DVB_DESC_EXTENSION            0x7F
 
 #define DVB_DESC_BSKYB_LCN            0xB1
 
index df14f47ec7890c2a0588eacd80d60451814a3856..fff6919e59e0944e980165ffd5559649cd53a909 100644 (file)
@@ -249,6 +249,7 @@ dvb_psi_parse_pmt
   int tt_position;
   int video_stream;
   int rds_uecp;
+  int ac4;
   int pcr_shared = 0;
   const char *lang;
   uint8_t audio_type, audio_version;
@@ -311,6 +312,7 @@ dvb_psi_parse_pmt
     composition_id = -1;
     ancillary_id = -1;
     rds_uecp = 0;
+    ac4 = 0;
     position = 0;
     tt_position = 1000;
     lang = NULL;
@@ -439,8 +441,14 @@ dvb_psi_parse_pmt
           hts_stream_type = SCT_EAC3;
         break;
 
-      case DVB_DESC_AC4:
-        if(estype == 0x06 || estype == 0x81)
+      case DVB_DESC_EXTENSION:
+        if(dlen < 1)
+          break;
+
+        if(ptr[0] == 0x15) /* descriptor_tag_extension : AC-4 */
+          ac4 = 1;
+
+        if((estype == 0x06 || estype == 0x81) && ac4)
           hts_stream_type = SCT_AC4;
         break;