]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/mjpegdec: Check initializing Huffman tables
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sat, 3 Apr 2021 14:00:56 +0000 (16:00 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sat, 3 Apr 2021 15:49:01 +0000 (17:49 +0200)
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
libavcodec/mjpegdec.c

index 776797d35b71982da4a1bcda62624bf46ddbb763..d0c933b52eb5d70806fafcd7972244a223a82ba4 100644 (file)
@@ -154,7 +154,8 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
         if (ff_mjpeg_decode_dht(s)) {
             av_log(avctx, AV_LOG_ERROR,
                    "error using external huffman table, switching back to internal\n");
-            init_default_huffman_tables(s);
+            if ((ret = init_default_huffman_tables(s)) < 0)
+                return ret;
         }
     }
     if (avctx->field_order == AV_FIELD_BB) { /* quicktime icefloe 019 */