Mercurial > libavcodec.hg
changeset 6120:6d52514f9c41 libavcodec
check for request_channels in dca init function
author | jbr |
---|---|
date | Sat, 05 Jan 2008 21:23:57 +0000 |
parents | 49d225414a3f |
children | bc59962f70b9 |
files | dca.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dca.c Sat Jan 05 21:08:20 2008 +0000 +++ b/dca.c Sat Jan 05 21:23:57 2008 +0000 @@ -1230,6 +1230,13 @@ pre_calc_cosmod(s); 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; }