[FFmpeg-devel] [PATCH] DCA - setup correct channel value when downmixing is required
Benjamin Larsson
banan
Sat Jul 24 11:25:42 CEST 2010
On 24/07/10 02:49, FB2000 wrote:
> 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 {
Patch ok.
MvH
Benjamin Larsson
More information about the ffmpeg-devel
mailing list