]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dvb psi: fix the wrong video stream detection (subtitle tag), fixes #3464
authorJaroslav Kysela <perex@perex.cz>
Sat, 2 Jan 2016 15:24:30 +0000 (16:24 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 2 Jan 2016 15:24:30 +0000 (16:24 +0100)
src/input/mpegts/dvb_psi.c

index ed4aa5dbee8f4e974479d5a411086d4434a7a1c9..afd27673e071901cbaa234c6338940f031662fec 100644 (file)
@@ -2147,6 +2147,7 @@ psi_parse_pmt
   int version;
   int position;
   int tt_position;
+  int video_stream;
   const char *lang;
   uint8_t audio_type;
 
@@ -2213,6 +2214,7 @@ psi_parse_pmt
     tt_position = 1000;
     lang = NULL;
     audio_type = 0;
+    video_stream = 0;
 
     switch(estype) {
     case 0x01:
@@ -2270,6 +2272,10 @@ psi_parse_pmt
         update |= psi_desc_ca(t, ptr, dlen);
         break;
 
+      case DVB_DESC_VIDEO_STREAM:
+        video_stream = dlen > 0 && SCT_ISVIDEO(hts_stream_type);
+        break;
+
       case DVB_DESC_REGISTRATION:
         if(mux->mm_pmt_ac3 != MM_AC3_PMT_N05 && dlen == 4 &&
            ptr[0] == 'A' && ptr[1] == 'C' && ptr[2] == '-' &&  ptr[3] == '3')
@@ -2303,7 +2309,7 @@ psi_parse_pmt
         break;
 
       case DVB_DESC_SUBTITLE:
-        if(dlen < 8)
+        if(dlen < 8 || video_stream)
           break;
 
         lang = lang_code_get2((const char*)ptr, 3);