Commit 9ac154d1 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/ac3dec: Reset SPX when switching from EAC3 to AC3

Fixes Ticket5319
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 9779b626
...@@ -895,11 +895,13 @@ static int decode_audio_block(AC3DecodeContext *s, int blk) ...@@ -895,11 +895,13 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
ff_eac3_default_spx_band_struct, ff_eac3_default_spx_band_struct,
&s->num_spx_bands, &s->num_spx_bands,
s->spx_band_sizes); s->spx_band_sizes);
} else { }
for (ch = 1; ch <= fbw_channels; ch++) { }
s->channel_uses_spx[ch] = 0; if (!s->eac3 || !s->spx_in_use) {
s->first_spx_coords[ch] = 1; s->spx_in_use = 0;
} for (ch = 1; ch <= fbw_channels; ch++) {
s->channel_uses_spx[ch] = 0;
s->first_spx_coords[ch] = 1;
} }
} }
......
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