Commit 42bd0cd2 authored by Nigel Touati-Evans's avatar Nigel Touati-Evans Committed by Michael Niedermayer

Fix copying extradata to codec in mxfdec.c

The code that copies any extradata from the MXFDescriptor to the codec does
not set the size, which it should otherwise the copied data is useless.
Attached it a patch to correct this.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e4198d2f
......@@ -1601,8 +1601,10 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
}
if (descriptor->extradata) {
st->codec->extradata = av_mallocz(descriptor->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (st->codec->extradata)
if (st->codec->extradata) {
memcpy(st->codec->extradata, descriptor->extradata, descriptor->extradata_size);
st->codec->extradata_size = descriptor->extradata_size;
}
} else if(st->codec->codec_id == AV_CODEC_ID_H264) {
ff_generate_avci_extradata(st);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment