X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fffmpeg%2Faudio_channel_remapper.cpp;h=a49395a870cbeab8f4d89f15eff7482cdc78762a;hb=c537308072c50a6b8bba9fb5db7bc837aeae6ce7;hp=4290f481bb244df669825c5b981436e55ec49074;hpb=e54e9fb019a185d9516b99d33d4c8aa8e44ccd7e;p=casparcg diff --git a/modules/ffmpeg/audio_channel_remapper.cpp b/modules/ffmpeg/audio_channel_remapper.cpp index 4290f481b..a49395a87 100644 --- a/modules/ffmpeg/audio_channel_remapper.cpp +++ b/modules/ffmpeg/audio_channel_remapper.cpp @@ -144,18 +144,13 @@ struct audio_channel_remapper::impl if (!the_same_layouts_) { auto mix_config = mix_repo->get_config(input_layout_.type, output_layout_.type); - auto pan_filter = u8(generate_pan_filter_str(input_layout_, output_layout_, mix_config)); + auto pan_filter = "[a:0] " + u8(generate_pan_filter_str(input_layout_, output_layout_, mix_config)) + " [aout:0]"; CASPAR_LOG(debug) << "[audio_channel_remapper] Using audio filter: " << pan_filter; auto quiet_logging = ffmpeg::temporary_enable_quiet_logging_for_thread(true); filter_.reset(new ffmpeg::audio_filter( - boost::rational(1, 1), - 48000, - AV_SAMPLE_FMT_S32, - ffmpeg::create_channel_layout_bitmask(input_layout_.num_channels), - { 48000 }, - { AV_SAMPLE_FMT_S32 }, - { ffmpeg::create_channel_layout_bitmask(output_layout_.num_channels) }, + { ffmpeg::audio_input_pad(boost::rational(1, 1), 48000, AV_SAMPLE_FMT_S32, ffmpeg::create_channel_layout_bitmask(input_layout_.num_channels)) }, + { ffmpeg::audio_output_pad({ 48000 }, { AV_SAMPLE_FMT_S32 }, { ffmpeg::create_channel_layout_bitmask(output_layout_.num_channels) }) }, pan_filter)); } else @@ -193,9 +188,9 @@ struct audio_channel_remapper::impl static_cast(input_frame->format), 16); - filter_->push(input_frame); + filter_->push(0, input_frame); - auto frames = filter_->poll_all(); + auto frames = filter_->poll_all(0); CASPAR_ENSURE(frames.size() == 1); // Expect 1:1 from pan filter