[FFmpeg-cvslog] avcodec/mjpegdec: only run EOI emulation code when there was a scan

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


ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 19 04:56:13 2014 +0100| [55a4228ac2ee1890c5c139e5af8cc1e980d31953] | committer: Carl Eugen Hoyos

avcodec/mjpegdec: only run EOI emulation code when there was a scan

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

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

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

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 78f63fe..60a47f2 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1811,7 +1811,7 @@ eoi_parser:
                    (get_bits_count(&s->gb) + 7) / 8, get_bits_count(&s->gb));
         }
     }
-    if (s->got_picture) {
+    if (s->got_picture && s->cur_scan) {
         av_log(avctx, AV_LOG_WARNING, "EOI missing, emulating\n");
         goto eoi_parser;
     }



More information about the ffmpeg-cvslog mailing list