avcodec/mjpegdec: Dont treat the lack of a startcode differently from end of the...
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 19 Jan 2014 03:02:11 +0000 (04:02 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 19 Jan 2014 13:57:56 +0000 (14:57 +0100)
Fixes Ticket3303

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 31e703e899bee74c50efd8eb62c3d012ef5ab26d)

libavcodec/mjpegdec.c

index 60a47f2..be85fc5 100644 (file)
@@ -1659,7 +1659,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                                           &unescaped_buf_size);
         /* EOF */
         if (start_code < 0) {
-            goto the_end;
+            break;
         } else if (unescaped_buf_size > INT_MAX / 8) {
             av_log(avctx, AV_LOG_ERROR,
                    "MJPEG packet 0x%x too big (%d/%d), corrupt data?\n",