[FFmpeg-cvslog] avcodec/mpeg4video_parser: Fix incorrect spliting of MPEG-4 studio frames

Michael Niedermayer git at videolan.org
Mon Apr 30 21:41:39 EEST 2018


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Apr 29 23:56:15 2018 +0200| [a47bd1cd1c714ac94cea9d3a26b58de521a7debc] | committer: Michael Niedermayer

avcodec/mpeg4video_parser: Fix incorrect spliting of MPEG-4 studio frames

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a47bd1cd1c714ac94cea9d3a26b58de521a7debc
---

 libavcodec/mpeg4video_parser.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/mpeg4video_parser.c b/libavcodec/mpeg4video_parser.c
index b7d6da1f75..32d3a83ebf 100644
--- a/libavcodec/mpeg4video_parser.c
+++ b/libavcodec/mpeg4video_parser.c
@@ -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;



More information about the ffmpeg-cvslog mailing list