[FFmpeg-devel] [PATCH] DCA - setup correct channel value when downmixing is required
FB2000
flybird2k
Sat Jul 24 02:49:12 CEST 2010
Without this, trying to convert 5.1 DTS sample to 2 channels Wave with
command
ffmpeg -i sample.dts -ac 2 out.wav
always failed with error "Resampling with input channels greater than 2
unsupported", because avctx->channels still equals to 6.
Index: dca.c
===================================================================
--- dca.c (revision 24472)
+++ dca.c (working copy)
@@ -1371,6 +1371,7 @@
if (avctx->request_channels == 2 && s->prim_channels > 2) {
channels = 2;
s->output = DCA_STEREO;
+ avctx->channels = 2;
avctx->channel_layout = CH_LAYOUT_STEREO;
}
} else {
More information about the ffmpeg-devel
mailing list