aacdec: Don't fall back to the old output configuration when no old configuration is present.

Fixes MP4 files where the first frame is broken.
This commit is contained in:
Alex Converse 2012-08-07 12:19:58 -07:00
parent f89584ca44
commit 122d5c526a
1 changed files with 1 additions and 1 deletions

View File

@ -365,7 +365,7 @@ static void push_output_configuration(AACContext *ac) {
* configuration is unlocked. * configuration is unlocked.
*/ */
static void pop_output_configuration(AACContext *ac) { static void pop_output_configuration(AACContext *ac) {
if (ac->oc[1].status != OC_LOCKED) { if (ac->oc[1].status != OC_LOCKED && ac->oc[0].status != OC_NONE) {
ac->oc[1] = ac->oc[0]; ac->oc[1] = ac->oc[0];
ac->avctx->channels = ac->oc[1].channels; ac->avctx->channels = ac->oc[1].channels;
ac->avctx->channel_layout = ac->oc[1].channel_layout; ac->avctx->channel_layout = ac->oc[1].channel_layout;