[FFmpeg-cvslog] lavc/mjpegdec: allow failure while decoding APP

Clément Bœsch git at videolan.org
Fri Apr 7 19:04:27 EEST 2017


ffmpeg | branch: master | Clément Bœsch <cboesch at gopro.com> | Fri Apr  7 17:50:44 2017 +0200| [8d94d9798a6903fc65ceb8e5af843cb6a793e045] | committer: Clément Bœsch

lavc/mjpegdec: allow failure while decoding APP

Fix decoding frame.jpg from ticket #267

Regression since 9c7ee3749 / 212c6a1d7

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

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

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index cef3b38..98cbd41 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2144,7 +2144,8 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
             /* APP fields */
         } else if (start_code >= APP0 && start_code <= APP15) {
             if ((ret = mjpeg_decode_app(s)) < 0)
-                return ret;
+                av_log(avctx, AV_LOG_ERROR, "unable to decode APP fields: %s\n",
+                       av_err2str(ret));
             /* Comment */
         } else if (start_code == COM) {
             ret = mjpeg_decode_com(s);



More information about the ffmpeg-cvslog mailing list