[vlc-commits] [Git][videolan/vlc][master] demux: ts: skip Denver PVR header

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Nov 25 10:18:11 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
9c867fc1 by Francois Cartegnie at 2022-11-25T09:47:49+00:00
demux: ts: skip Denver PVR header

- - - - -


1 changed file:

- modules/demux/mpeg/ts.c


Changes:

=====================================
modules/demux/mpeg/ts.c
=====================================
@@ -266,6 +266,7 @@ static int DetectPVRHeadersAndHeaderSize( demux_t *p_demux, unsigned *pi_header_
     const uint8_t *p_peek;
     *pi_header_size = 0;
     int i_packet_size = -1;
+    int i_offset = 0;
 
     if( vlc_stream_Peek( p_demux->s,
                      &p_peek, TS_PACKET_SIZE_MAX ) < TS_PACKET_SIZE_MAX )
@@ -349,8 +350,13 @@ static int DetectPVRHeadersAndHeaderSize( demux_t *p_demux, unsigned *pi_header_
             //return TS_PACKET_SIZE_188;
         }
     }
+    else if( !memcmp( p_peek, "\x47\xff\xffPRIV", 7 ) ) /* Denver */
+    {
+        /* Bogus TS packets with private payload interleaved in stream */
+        i_offset = TS_PACKET_SIZE_188 * 11;
+    }
 
-    return DetectPacketSize( p_demux, pi_header_size, 0 );
+    return DetectPacketSize( p_demux, pi_header_size, i_offset );
 }
 
 /*****************************************************************************



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9c867fc138bf291f5757bad2b45b0d1fea0a5fc0

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9c867fc138bf291f5757bad2b45b0d1fea0a5fc0
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list