vlc | branch: master | Francois Cartegnie <[email protected]> | Mon Dec 12 
14:55:15 2016 +0100| [64af70b902438da6628ef75ca862946e10b9d1bb] | committer: 
Francois Cartegnie

demux: ts: add some more mpeg1 checks

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=64af70b902438da6628ef75ca862946e10b9d1bb
---

 modules/demux/mpeg/pes.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/mpeg/pes.h b/modules/demux/mpeg/pes.h
index 7ad420a..d9efb9e 100644
--- a/modules/demux/mpeg/pes.h
+++ b/modules/demux/mpeg/pes.h
@@ -122,6 +122,7 @@ static int ParsePESHeader( vlc_object_t *p_object, const 
uint8_t *p_header, size
                 msg_Err( p_object, "too much MPEG-1 stuffing" );
                 return VLC_EGENERIC;
             }
+            /* Skip STD buffer size */
             if( ( p_header[i_skip] & 0xC0 ) == 0x40 )
             {
                 i_skip += 2;
@@ -150,6 +151,8 @@ static int ParsePESHeader( vlc_object_t *p_object, const 
uint8_t *p_header, size
             }
             else
             {
+                if( p_header[i_skip] & 0xFF != 0x0F ) /* No pts/dts, lowest 
bits set to 0x0F */
+                    return VLC_EGENERIC;
                 i_skip += 1;
             }
         }

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to