summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorNigel Touati-Evans <nigel.touatievans@gmail.com>2013-06-27 12:28:43 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-06-27 13:32:48 +0200
commit42bd0cd21ae68abef4436cc97d67f592be38d3e3 (patch)
tree58a492fb89aa9417e2a50e56b491f4c95cc2afe4 /libavformat
parente4198d2fc3d98d076240530e095608272671f61d (diff)
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: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mxfdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index e59bcfcc80..29a2f563e6 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -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);
}