# HG changeset patch # User banan # Date 1225016056 0 # Node ID 6bc70b15451d1be8865a05734cdd0b5631f02b4b # Parent 17aeecee2a97a1cfe766c04fa6d6fa7fffda8a27 Disable codec downmix when not using simd instead of silently produce silence diff -r 17aeecee2a97 -r 6bc70b15451d dca.c --- a/dca.c Sun Oct 26 09:54:53 2008 +0000 +++ b/dca.c Sun Oct 26 10:14:16 2008 +0000 @@ -1204,11 +1204,6 @@ dsputil_init(&s->dsp, avctx); ff_mdct_init(&s->imdct, 6, 1); - /* allow downmixing to stereo */ - if (avctx->channels > 0 && avctx->request_channels < avctx->channels && - avctx->request_channels == 2) { - avctx->channels = avctx->request_channels; - } for(i = 0; i < 6; i++) s->samples_chanptr[i] = s->samples + i * 256; avctx->sample_fmt = SAMPLE_FMT_S16; @@ -1219,6 +1214,12 @@ } else { s->add_bias = 0.0f; s->scale_bias = 1.0; + + /* allow downmixing to stereo */ + if (avctx->channels > 0 && avctx->request_channels < avctx->channels && + avctx->request_channels == 2) { + avctx->channels = avctx->request_channels; + } }