Commit ae2d8404 authored by jbr's avatar jbr

check for request_channels in dca init function

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11423 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4a63076a
...@@ -1230,6 +1230,13 @@ static int dca_decode_init(AVCodecContext * avctx) ...@@ -1230,6 +1230,13 @@ static int dca_decode_init(AVCodecContext * avctx)
pre_calc_cosmod(s); pre_calc_cosmod(s);
dsputil_init(&s->dsp, avctx); dsputil_init(&s->dsp, avctx);
/* allow downmixing to stereo */
if (avctx->channels > 0 && avctx->request_channels < avctx->channels &&
avctx->request_channels == 2) {
avctx->channels = avctx->request_channels;
}
return 0; return 0;
} }
......
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