Commit 375d05b4 authored by jbr's avatar jbr

check for request_channels at codec init

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11415 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c1d2b8f6
......@@ -312,6 +312,13 @@ static int ac3_decode_init(AVCodecContext *avctx)
s->mul_bias = 32767.0f;
}
/* allow downmixing to stereo or mono */
if (avctx->channels > 0 && avctx->request_channels > 0 &&
avctx->request_channels < avctx->channels &&
avctx->request_channels <= 2) {
avctx->channels = avctx->request_channels;
}
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