diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-11-26 21:54:54 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-27 07:21:00 +0100 |
commit | eda1ed6f914a762a30e13e538f380355e8b7337a (patch) | |
tree | 394885b4a0140c179e079aff3a6911c8a6a66d57 /libavcodec/mjpegbdec.c | |
parent | 4ec5d6896d2396f6a9f3dd558e393eeacc22dd6f (diff) | |
download | ffmpeg-eda1ed6f914a762a30e13e538f380355e8b7337a.tar.gz |
avcodec/mjpegdec: Fix memleak upon init failure
This affected all decoders that used ff_mjpeg_decode_init() as init
function; and it also affected decoders that open jpeg decoders via
ff_codec_open2_recursive() as well as MxPEG.
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit f3e645a7967d64df8a19c4e0eea93f17937913fb)
Diffstat (limited to 'libavcodec/mjpegbdec.c')
-rw-r--r-- | libavcodec/mjpegbdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegbdec.c b/libavcodec/mjpegbdec.c index 70ff4cf563..7666674908 100644 --- a/libavcodec/mjpegbdec.c +++ b/libavcodec/mjpegbdec.c @@ -163,5 +163,5 @@ AVCodec ff_mjpegb_decoder = { .decode = mjpegb_decode_frame, .capabilities = AV_CODEC_CAP_DR1, .max_lowres = 3, - .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, }; |