You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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>
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
#define BITSTREAM_READER_LE
|
#define BITSTREAM_READER_LE
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "get_bits.h"
|
#include "get_bits.h"
|
||||||
|
#include "internal.h"
|
||||||
#include "ivi.h"
|
#include "ivi.h"
|
||||||
#include "ivi_dsp.h"
|
#include "ivi_dsp.h"
|
||||||
#include "indeo5data.h"
|
#include "indeo5data.h"
|
||||||
@@ -692,4 +693,5 @@ AVCodec ff_indeo5_decoder = {
|
|||||||
.close = ff_ivi_decode_close,
|
.close = ff_ivi_decode_close,
|
||||||
.decode = ff_ivi_decode_frame,
|
.decode = ff_ivi_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.capabilities = AV_CODEC_CAP_DR1,
|
||||||
|
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user