summaryrefslogtreecommitdiff
path: root/libavcodec/indeo5.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-14 20:59:12 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-15 19:25:26 +0200
commitd8fc69bd6a20394adf42406bf80bd06b4c8d7384 (patch)
tree4903613b26d5d525e0ba4c6124a028a6b7db7057 /libavcodec/indeo5.c
parente411a3af11e5d00a311f594a45c17f74898cb46e (diff)
downloadffmpeg-d8fc69bd6a20394adf42406bf80bd06b4c8d7384.tar.gz
avcodec/indeo5: Fix memleaks upon allocation error
ff_ivi_init_planes() might error out after having allocated some arrays. Set the FF_CODEC_CAP_INIT_CLEANUP flag in order to free these arrays in this case. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/indeo5.c')
-rw-r--r--libavcodec/indeo5.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
index 4ccdbcaf0a..ac15d31fef 100644
--- a/libavcodec/indeo5.c
+++ b/libavcodec/indeo5.c
@@ -30,6 +30,7 @@
#define BITSTREAM_READER_LE
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "ivi.h"
#include "ivi_dsp.h"
#include "indeo5data.h"
@@ -692,4 +693,5 @@ AVCodec ff_indeo5_decoder = {
.close = ff_ivi_decode_close,
.decode = ff_ivi_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};