[FFmpeg-cvslog] MJPEG: emulate EOI also on two consecutive SOI.

Reimar Döffinger git at videolan.org
Thu Sep 1 22:56:23 CEST 2011


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sat Aug 27 14:37:14 2011 +0200| [5e2ea138b7c4c7f3910837611338bb3b8b761045] | committer: Reimar Döffinger

MJPEG: emulate EOI also on two consecutive SOI.

Fixes issue #362.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

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

 libavcodec/mjpegdec.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index da0c5a9..eac30e6 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1442,6 +1442,10 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx,
 
                     s->restart_count = 0;
                     /* nothing to do on SOI */
+                    if (s->got_picture) {
+                        av_log(avctx, AV_LOG_WARNING, "EOI missing, emulating\n");
+                        goto eoi_parser;
+                    }
                     break;
                 case DQT:
                     ff_mjpeg_decode_dqt(s);



More information about the ffmpeg-cvslog mailing list