diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-09-26 12:13:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-03 21:48:38 +0100 |
commit | c5142a95a51320e65d80d6bca0eb69fcff05508f (patch) | |
tree | 598fb210c550812b96f9aad20dd421cc4d430e0b /libavformat/mxfdec.c | |
parent | def01739c1365a5650b4222d59124132cee4f4fe (diff) | |
download | ffmpeg-c5142a95a51320e65d80d6bca0eb69fcff05508f.tar.gz |
Support more AVC-Intra files
Followup to http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/151321
patch by Reimar and Thomas Mundt fixes some AVC-Intra files from
different tickets.
It does not fix http://samples.ffmpeg.org/ffmpeg-
bugs/trac/ticket524/AVCI50.mov
Authors of this commit are: Reimar and Thomas Mundt
Patch and commit message mostly taken from ffmpeg-devel, mail by Carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r-- | libavformat/mxfdec.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index ce978364ac..bb5f4a7808 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -1506,11 +1506,6 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) /* TODO: drop PictureEssenceCoding and SoundEssenceCompression, only check EssenceContainer */ codec_ul = mxf_get_codec_ul(ff_mxf_codec_uls, &descriptor->essence_codec_ul); st->codec->codec_id = (enum AVCodecID)codec_ul->id; - if (descriptor->extradata) { - st->codec->extradata = av_mallocz(descriptor->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); - if (st->codec->extradata) - memcpy(st->codec->extradata, descriptor->extradata, descriptor->extradata_size); - } if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { source_track->intra_only = mxf_is_intra_only(descriptor); container_ul = mxf_get_codec_ul(mxf_picture_essence_container_uls, essence_container_ul); @@ -1594,6 +1589,13 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) st->need_parsing = AVSTREAM_PARSE_FULL; } } + if (descriptor->extradata) { + st->codec->extradata = av_mallocz(descriptor->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); + if (st->codec->extradata) + memcpy(st->codec->extradata, descriptor->extradata, descriptor->extradata_size); + } else if(st->codec->codec_id == CODEC_ID_H264) { + ff_generate_avci_extradata(st); + } if (st->codec->codec_type != AVMEDIA_TYPE_DATA && (*essence_container_ul)[15] > 0x01) { /* TODO: decode timestamps */ st->need_parsing = AVSTREAM_PARSE_TIMESTAMPS; |