changeset 23722:5c5a3b4c0eb7

unified the skip of header and stuffing bytes after the parsing of pes_extension[12] fields
author nicodvb
date Sun, 08 Jul 2007 10:06:47 +0000
parents bf545b65d688
children 148b85340a65
files libmpdemux/demux_mpg.c
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mpg.c	Sun Jul 08 03:29:23 2007 +0000
+++ b/libmpdemux/demux_mpg.c	Sun Jul 08 10:06:47 2007 +0000
@@ -362,10 +362,7 @@
       len-=10;hdrlen-=10;
     }
     len-=hdrlen;
-    if(hdrlen>0) {
-      if(!parse_ext2)
-        stream_skip(demux->stream,hdrlen); // skip header bytes
-      else if(hdrlen>=3) {
+      if(parse_ext2 && hdrlen>=3) {
         c=stream_read_char(demux->stream);
         hdrlen--;
 
@@ -414,9 +411,9 @@
         hdrlen--;
         if(c<0x55 || c>0x5F)   { mp_msg(MSGT_DEMUX,MSGL_V,"demux_mpg: unknown vc1 substream_id: 0x%x  \n", c); return -1;}
         pes_ext2_subid=c;
-        if(hdrlen>0) stream_skip(demux->stream, hdrlen);
       }
-    }
+    if(hdrlen>0)
+      stream_skip(demux->stream,hdrlen); // skip header and stuffing bytes
     
     if(id==0x1FD && pes_ext2_subid!=-1) {
       //==== EVO VC1 STREAMS ===//