Revision ba5fc967

View differences:

libavcodec/dca.c
1204 1204
    dsputil_init(&s->dsp, avctx);
1205 1205
    ff_mdct_init(&s->imdct, 6, 1);
1206 1206

  
1207
    /* allow downmixing to stereo */
1208
    if (avctx->channels > 0 && avctx->request_channels < avctx->channels &&
1209
            avctx->request_channels == 2) {
1210
        avctx->channels = avctx->request_channels;
1211
    }
1212 1207
    for(i = 0; i < 6; i++)
1213 1208
        s->samples_chanptr[i] = s->samples + i * 256;
1214 1209
    avctx->sample_fmt = SAMPLE_FMT_S16;
......
1219 1214
    } else {
1220 1215
        s->add_bias = 0.0f;
1221 1216
        s->scale_bias = 1.0;
1217

  
1218
        /* allow downmixing to stereo */
1219
        if (avctx->channels > 0 && avctx->request_channels < avctx->channels &&
1220
                avctx->request_channels == 2) {
1221
            avctx->channels = avctx->request_channels;
1222
        }
1222 1223
    }
1223 1224

  
1224 1225

  

Also available in: Unified diff