diff options
author | Nigel Touati-Evans <nigel.touatievans@gmail.com> | 2013-06-27 15:28:43 +0400 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-06-27 16:15:12 +0400 |
commit | fcc6460dbfccfb551fc6496b9e685b58839d1f1c (patch) | |
tree | caff426bb66d9ba0f86e143644ceabe31b782aef /libavformat | |
parent | 1065d4197e979f5b37d5232e90eeb1f35d994ccd (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.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 42bd0cd21ae68abef4436cc97d67f592be38d3e3)
Conflicts:
libavformat/mxfdec.c
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mxfdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index f7aaa5a9de..06aa8ac617 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -1600,8 +1600,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 == CODEC_ID_H264) { ff_generate_avci_extradata(st); } |