1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/ac3dec: don't override existing downmix coefficient with default ones

With this, if the eac3 dependent frame doesn't have coded downmix values when
parsed by ff_eac3_parse_header(), it will inherit the coded ones from the core
ac3 frame instead of ignoring them.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-01-15 22:12:28 -03:00
parent ea381285e7
commit 4563cf95ca

View File

@ -345,9 +345,11 @@ static int parse_frame_header(AC3DecodeContext *s)
s->frame_size = hdr.frame_size;
s->superframe_size += hdr.frame_size;
s->preferred_downmix = AC3_DMIXMOD_NOTINDICATED;
s->center_mix_level = hdr.center_mix_level;
if (hdr.bitstream_id <= 10) {
s->center_mix_level = hdr.center_mix_level;
s->surround_mix_level = hdr.surround_mix_level;
}
s->center_mix_level_ltrt = 4; // -3.0dB
s->surround_mix_level = hdr.surround_mix_level;
s->surround_mix_level_ltrt = 4; // -3.0dB
s->lfe_mix_level_exists = 0;
s->num_blocks = hdr.num_blocks;