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.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 42bd0cd21a
)
Conflicts:
libavformat/mxfdec.c
This commit is contained in:

committed by
Carl Eugen Hoyos

parent
24dc6b1a06
commit
e2dcc4452d
@@ -1591,8 +1591,10 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
|
|||||||
}
|
}
|
||||||
if (descriptor->extradata) {
|
if (descriptor->extradata) {
|
||||||
st->codec->extradata = av_mallocz(descriptor->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
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);
|
memcpy(st->codec->extradata, descriptor->extradata, descriptor->extradata_size);
|
||||||
|
st->codec->extradata_size = descriptor->extradata_size;
|
||||||
|
}
|
||||||
} else if(st->codec->codec_id == CODEC_ID_H264) {
|
} else if(st->codec->codec_id == CODEC_ID_H264) {
|
||||||
ff_generate_avci_extradata(st);
|
ff_generate_avci_extradata(st);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user