diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2008-01-05 21:23:57 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2008-01-05 21:23:57 +0000 |
commit | cfec09e91423018bbefe29e31254e03e0d286ce5 (patch) | |
tree | 5e0beef257c9dc9073e66ef331e8167e44c7aed4 /libavcodec/dca.c | |
parent | ef7f2bb782de8758afa2d8d1456da8148c38bb65 (diff) | |
download | ffmpeg-streaming-cfec09e91423018bbefe29e31254e03e0d286ce5.zip ffmpeg-streaming-cfec09e91423018bbefe29e31254e03e0d286ce5.tar.gz |
check for request_channels in dca init function
Originally committed as revision 11423 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dca.c')
-rw-r--r-- | libavcodec/dca.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c index 0bfc294..9d373e2 100644 --- a/libavcodec/dca.c +++ b/libavcodec/dca.c @@ -1230,6 +1230,13 @@ static int dca_decode_init(AVCodecContext * avctx) 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; } |