Commit 9bd1d795 authored by foo86's avatar foo86 Committed by Michael Niedermayer

avcodec/dca_exss: always update downmix flags

Fixes potential parsing failure when total number of channels indicated
by EXSS asset descriptor decreases mid-stream and stale embedded downmix
flags are referenced.
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 5b8faaad
......@@ -112,12 +112,10 @@ static int parse_descriptor(DCAExssParser *s, DCAExssAsset *asset)
int nspeakers[8];
// Embedded stereo flag
if (asset->nchannels_total > 2)
asset->embedded_stereo = get_bits1(&s->gb);
asset->embedded_stereo = asset->nchannels_total > 2 && get_bits1(&s->gb);
// Embedded 6 channels flag
if (asset->nchannels_total > 6)
asset->embedded_6ch = get_bits1(&s->gb);
asset->embedded_6ch = asset->nchannels_total > 6 && get_bits1(&s->gb);
// Speaker mask enabled flag
if (asset->spkr_mask_enabled = get_bits1(&s->gb)) {
......
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