]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/mpeg4video_parser: Fix incorrect spliting of MPEG-4 studio frames
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 29 Apr 2018 21:56:15 +0000 (23:56 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 30 Apr 2018 18:39:56 +0000 (20:39 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mpeg4video_parser.c

index b7d6da1f75257ff007243b5cec710ace73ba6ff2..32d3a83ebf08780b3f78209139e1c0d093360e1b 100644 (file)
@@ -61,6 +61,8 @@ int ff_mpeg4_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size)
         for (; i < buf_size; i++) {
             state = (state << 8) | buf[i];
             if ((state & 0xFFFFFF00) == 0x100) {
+                if (state == SLICE_STARTCODE || state == EXT_STARTCODE)
+                    continue;
                 pc->frame_start_found = 0;
                 pc->state             = -1;
                 return i - 3;