summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2011-11-17 15:06:35 +0100
committerClément Bœsch <ubitux@gmail.com>2011-11-17 18:30:03 +0100
commiteafa2b600502f5e8b36b99a2737d6b3d3a58441f (patch)
tree092268c2591a8cfd3c53fd8253bbe8e0d1c0c8d4 /ffmpeg.c
parentd3baced24fcf602f2bceff1f73871303d4011c15 (diff)
swr: introduce a public function to customize the channel mapping.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c3
1 files changed, 2 insertions, 1 deletions
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);