From eafa2b600502f5e8b36b99a2737d6b3d3a58441f Mon Sep 17 00:00:00 2001 From: Clément Bœsch Date: Thu, 17 Nov 2011 15:06:35 +0100 Subject: swr: introduce a public function to customize the channel mapping. --- ffmpeg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ffmpeg.c') diff --git a/ffmpeg.c b/ffmpeg.c index b664339934..9895fb3970 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -894,8 +894,9 @@ need_realloc: ost->swr = swr_alloc_set_opts(ost->swr, enc->channel_layout, enc->sample_fmt, enc->sample_rate, dec->channel_layout, dec->sample_fmt, dec->sample_rate, - ost->audio_channels_mapped ? ost->audio_channels_map : NULL, 0, NULL); + if (ost->audio_channels_mapped) + swr_set_channel_mapping(ost->swr, ost->audio_channels_map); av_opt_set_double(ost->swr, "rmvol", ost->rematrix_volume, 0); if (ost->audio_channels_mapped) { av_opt_set_int(ost->swr, "icl", av_get_default_channel_layout(ost->audio_channels_mapped), 0); -- cgit v1.2.3