[FFmpeg-cvslog] r11415 - trunk/libavcodec/ac3dec.c
jbr
subversion
Sat Jan 5 16:22:53 CET 2008
Author: jbr
Date: Sat Jan 5 16:22:53 2008
New Revision: 11415
Log:
check for request_channels at codec init
Modified:
trunk/libavcodec/ac3dec.c
Modified: trunk/libavcodec/ac3dec.c
==============================================================================
--- trunk/libavcodec/ac3dec.c (original)
+++ trunk/libavcodec/ac3dec.c Sat Jan 5 16:22:53 2008
@@ -312,6 +312,13 @@ static int ac3_decode_init(AVCodecContex
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;
}
More information about the ffmpeg-cvslog
mailing list