diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-11 20:40:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-11 20:56:29 +0100 |
commit | 419787a2ffe31c6c70e542aae8c93c00f3aeb237 (patch) | |
tree | 443014672a78e5092b1910e62af847a95c6d240e /libavformat/flvdec.c | |
parent | 5856bca360c5bc3e340a357d91b1f993c80a7bea (diff) | |
parent | 547f8345373843fe4428e2b3de6b46de4df797af (diff) | |
download | ffmpeg-419787a2ffe31c6c70e542aae8c93c00f3aeb237.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
flv: Workaround for buggy Omnia A/XE encoder
Conflicts:
libavformat/flvdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r-- | libavformat/flvdec.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 2844cd308b..b11e3352c1 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -943,6 +943,8 @@ retry_duration: dts = AV_NOPTS_VALUE; } if (type == 0 && (!st->codec->extradata || st->codec->codec_id == AV_CODEC_ID_AAC)) { + AVDictionaryEntry *t; + if (st->codec->extradata) { if ((ret = flv_queue_extradata(flv, s->pb, stream_type, size)) < 0) return ret; @@ -951,8 +953,15 @@ retry_duration: } if ((ret = flv_get_extradata(s, st, size)) < 0) return ret; + + /* Workaround for buggy Omnia A/XE encoder */ + t = av_dict_get(s->metadata, "Encoder", NULL, 0); + if (st->codec->codec_id == AV_CODEC_ID_AAC && t && !strcmp(t->value, "Omnia A/XE")) + st->codec->extradata_size = 2; + if (st->codec->codec_id == AV_CODEC_ID_AAC && 0) { MPEG4AudioConfig cfg; + if (avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata, st->codec->extradata_size * 8, 1) >= 0) { st->codec->channels = cfg.channels; |