mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
mxfdec: fix leak of extradata
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9e28c7ef64
commit
b65570808c
@ -866,6 +866,10 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int
|
||||
default:
|
||||
/* Private uid used by SONY C0023S01.mxf */
|
||||
if (IS_KLV_KEY(uid, mxf_sony_mpeg4_extradata)) {
|
||||
if (descriptor->extradata)
|
||||
av_log(NULL, AV_LOG_WARNING, "Duplicate sony_mpeg4_extradata\n");
|
||||
av_free(descriptor->extradata);
|
||||
descriptor->extradata_size = 0;
|
||||
descriptor->extradata = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!descriptor->extradata)
|
||||
return AVERROR(ENOMEM);
|
||||
|
Loading…
Reference in New Issue
Block a user