[FFmpeg-cvslog] avcodec/mjpegdec: Dont treat the lack of a startcode differently from end of the bitstream

Michael Niedermayer git at videolan.org
Sun Jan 19 15:00:34 CET 2014


ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 19 04:02:11 2014 +0100| [756cd1a305d23f9817f87c583b8d9ded28704893] | committer: Carl Eugen Hoyos

avcodec/mjpegdec: Dont treat the lack of a startcode differently from end of the bitstream

Fixes Ticket3303

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

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

 libavcodec/mjpegdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index b168bd9..1de7732 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1799,7 +1799,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",



More information about the ffmpeg-cvslog mailing list