]> git.sesse.net Git - ffmpeg/commitdiff
Ignore flags after pts/dts if there are no bytes left.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 4 Mar 2008 01:31:15 +0000 (01:31 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 4 Mar 2008 01:31:15 +0000 (01:31 +0000)
Fixes decoding of vdr-radio.vdr. (issue198)

Originally committed as revision 12310 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/mpeg.c

index 97b2a637a2222e2e422a56b1b896147cb561c66e..462ef73bc4a6ec5c5e313cfcbc0a5804c32e5f94 100644 (file)
@@ -334,6 +334,10 @@ static int mpegps_read_pes_header(AVFormatContext *s,
                 header_len -= 5;
             }
         }
+        if (flags & 0x3f && header_len == 0){
+            flags &= 0xC0;
+            av_log(s, AV_LOG_WARNING, "Further flags set but no bytes left\n");
+        }
         if (flags & 0x01) { /* PES extension */
             pes_ext = get_byte(s->pb);
             header_len--;