Commit 4da7111e authored by Benoit Fouet's avatar Benoit Fouet Committed by Michael Niedermayer

avcodec/aacdec: map LFE[0] to SCE[1] for 4.0 audio.

Fixes ticket #3930
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0b7e5d0d
......@@ -630,6 +630,16 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
return ac->tag_che_map[TYPE_CPE][elem_id] = ac->che[TYPE_CPE][1];
}
case 4:
/* Some streams incorrectly code 4.0 audio as
* SCE[0] CPE[0] LFE[0]
* instead of
* SCE[0] CPE[0] SCE[1].
* If we seem to have encountered such a stream, transfer
* the SCE[1] element to the LFE[0]'s mapping */
if (ac->tags_mapped == tags_per_config[ac->oc[1].m4ac.chan_config] - 1 && (type == TYPE_LFE || type == TYPE_SCE)) {
ac->tags_mapped++;
return ac->tag_che_map[type][elem_id] = ac->che[TYPE_SCE][1];
}
if (ac->tags_mapped == 2 &&
ac->oc[1].m4ac.chan_config == 4 &&
type == TYPE_SCE) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment