Reimar Döffinger
2011-08-27 12:43:04 UTC
Fixes issue #362.
Signed-off-by: Reimar Döffinger <***@gmx.de>
---
libavcodec/mjpegdec.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 6331e3d..57ce821 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1430,6 +1430,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);
Signed-off-by: Reimar Döffinger <***@gmx.de>
---
libavcodec/mjpegdec.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 6331e3d..57ce821 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1430,6 +1430,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);
--
1.7.5.4
1.7.5.4