mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:21:11 +01:00
flv: Workaround for buggy Omnia A/XE encoder
The Omnia A/XE encoder writes the explicit extra data incorrectly and wrongly disables parametric stereo. Truncating the extra data by setting the size to 2 works around this. The AAC extra data parser will then only parse the correct parts. Bug-id: 599
This commit is contained in:
parent
44a0a98f92
commit
547f834537
1 changed files with 6 additions and 0 deletions
|
|
@ -915,6 +915,12 @@ skip:
|
|||
return ret;
|
||||
if (st->codec->codec_id == AV_CODEC_ID_AAC) {
|
||||
MPEG4AudioConfig cfg;
|
||||
|
||||
/* Workaround for buggy Omnia A/XE encoder */
|
||||
AVDictionaryEntry *t = av_dict_get(s->metadata, "Encoder", NULL, 0);
|
||||
if (t && !strcmp(t->value, "Omnia A/XE"))
|
||||
st->codec->extradata_size = 2;
|
||||
|
||||
avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
|
||||
st->codec->extradata_size * 8, 1);
|
||||
st->codec->channels = cfg.channels;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue