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: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
foo86 2016-05-23 18:41:27 +03:00 committed by Michael Niedermayer
parent 5b8faaad6c
commit 9bd1d79584

View File

@ -112,12 +112,10 @@ static int parse_descriptor(DCAExssParser *s, DCAExssAsset *asset)
int nspeakers[8]; int nspeakers[8];
// Embedded stereo flag // Embedded stereo flag
if (asset->nchannels_total > 2) asset->embedded_stereo = asset->nchannels_total > 2 && get_bits1(&s->gb);
asset->embedded_stereo = get_bits1(&s->gb);
// Embedded 6 channels flag // Embedded 6 channels flag
if (asset->nchannels_total > 6) asset->embedded_6ch = asset->nchannels_total > 6 && get_bits1(&s->gb);
asset->embedded_6ch = get_bits1(&s->gb);
// Speaker mask enabled flag // Speaker mask enabled flag
if (asset->spkr_mask_enabled = get_bits1(&s->gb)) { if (asset->spkr_mask_enabled = get_bits1(&s->gb)) {