1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

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

Fixes Ticket5319

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9ac154d1fa)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-04-25 04:08:21 +02:00
parent 526aca805f
commit 49fc747b48

View File

@ -901,13 +901,15 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
ff_eac3_default_spx_band_struct,
&s->num_spx_bands,
s->spx_band_sizes);
} else {
}
}
if (!s->eac3 || !s->spx_in_use) {
s->spx_in_use = 0;
for (ch = 1; ch <= fbw_channels; ch++) {
s->channel_uses_spx[ch] = 0;
s->first_spx_coords[ch] = 1;
}
}
}
/* spectral extension coordinates */
if (s->spx_in_use) {