diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-03 16:00:56 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-03 17:49:01 +0200 |
commit | d5ddfec6c3ce0ff743e3d67c42a1a59d3afe8e8c (patch) | |
tree | 072176bf86c7ac0de770569878d637e91e333903 /libavcodec | |
parent | 3cc685b7bcc2bcc781b5632bf2e0af6ed941ae27 (diff) | |
download | ffmpeg-d5ddfec6c3ce0ff743e3d67c42a1a59d3afe8e8c.tar.gz |
avcodec/mjpegdec: Check initializing Huffman tables
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mjpegdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 776797d35b..d0c933b52e 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -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 */ |