swr: introduce a public function to customize the channel mapping.

This commit is contained in:
Clément Bœsch
2011-11-17 15:06:35 +01:00
parent d3baced24f
commit eafa2b6005
5 changed files with 25 additions and 11 deletions

View File

@@ -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);