summaryrefslogtreecommitdiff
path: root/libavcodec/jpeglsdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-26 21:54:54 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-04 15:46:46 +0100
commitf3e645a7967d64df8a19c4e0eea93f17937913fb (patch)
treea6c9c73edb7f3f3d0a8db67bd7a2260ec13abd53 /libavcodec/jpeglsdec.c
parent6a2defd7d8edc79115a2231de80d357e02e4a3ca (diff)
downloadffmpeg-f3e645a7967d64df8a19c4e0eea93f17937913fb.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>
Diffstat (limited to 'libavcodec/jpeglsdec.c')
-rw-r--r--libavcodec/jpeglsdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index 0b1e139048..1db6faa99c 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -553,5 +553,5 @@ AVCodec ff_jpegls_decoder = {
.close = ff_mjpeg_decode_end,
.decode = ff_mjpeg_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};