lavc/mjpegdec: allow failure while decoding APP
authorClément Bœsch <cboesch@gopro.com>
Fri, 7 Apr 2017 15:50:44 +0000 (17:50 +0200)
committerClément Bœsch <cboesch@gopro.com>
Fri, 7 Apr 2017 16:05:20 +0000 (18:05 +0200)
Fix decoding frame.jpg from ticket #267

Regression since 9c7ee3749 / 212c6a1d7

libavcodec/mjpegdec.c

index cef3b38..98cbd41 100644 (file)
@@ -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);