History

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.

James Almer committed 1 year ago

Commit 4563cf91 parent ea381281 file · +4 −2Browse files

Unified · Split

libavcodec/ac3dec.c+4−2
@@ -345,9 +345,11 @@ static int parse_frame_header(AC3DecodeContext *s) · 344 unmodified lines
345345 s->frame_size = hdr.frame_size;
346346 s->superframe_size += hdr.frame_size;
347347 s->preferred_downmix = AC3_DMIXMOD_NOTINDICATED;
348− s->center_mix_level = hdr.center_mix_level;
348+ if (hdr.bitstream_id <= 10) {
349+ s->center_mix_level = hdr.center_mix_level;
350+ s->surround_mix_level = hdr.surround_mix_level;
351+ }
349352 s->center_mix_level_ltrt = 4; // -3.0dB
350− s->surround_mix_level = hdr.surround_mix_level;
351353 s->surround_mix_level_ltrt = 4; // -3.0dB
352354 s->lfe_mix_level_exists = 0;
353355 s->num_blocks = hdr.num_blocks;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t