[vlc-commits] demux: ts: remove PES full header check

Francois Cartegnie git at videolan.org
Tue Mar 10 14:21:34 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Mar 10 14:18:32 2015 +0100| [68b840956ef31bc21cb72f474f5b175d673fdcc9] | committer: Francois Cartegnie

demux: ts: remove PES full header check

Some full headers (including filling) are more than 34 bytes.
Now fail late parsing it, and relegate header>packet size check
to caller.

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

 modules/demux/ts.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index adacd46..8a49cde 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -2136,8 +2136,6 @@ static int ParsePESHeader( demux_t *p_demux, const uint8_t *p_header, size_t i_h
         {
             /* mpeg2 PES */
             i_skip = p_header[8] + 9;
-            if( i_header < i_skip )
-                return VLC_EGENERIC;
 
             if( p_header[7]&0x80 )    /* has pts */
             {
@@ -2203,9 +2201,6 @@ static int ParsePESHeader( demux_t *p_demux, const uint8_t *p_header, size_t i_h
         break;
     }
 
-    if( i_header < i_skip )
-        return VLC_EGENERIC;
-
     *pi_skip = i_skip;
     return VLC_SUCCESS;
 }



More information about the vlc-commits mailing list