X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fffmpeg%2Faudio_channel_remapper.cpp;h=5b632690e5729543de7975f5a3df293794c9b789;hb=009816de6e071c6a35c74b0954d04cf61005b971;hp=920aa7203d17d0baca4e33b10bc60fd43586c3bd;hpb=4439ad71cff8cd80c1eeabc059b6f86da6067980;p=casparcg diff --git a/modules/ffmpeg/audio_channel_remapper.cpp b/modules/ffmpeg/audio_channel_remapper.cpp index 920aa7203..5b632690e 100644 --- a/modules/ffmpeg/audio_channel_remapper.cpp +++ b/modules/ffmpeg/audio_channel_remapper.cpp @@ -166,25 +166,8 @@ struct audio_channel_remapper::impl auto num_samples = input.size() / input_layout_.num_channels; auto expected_output_size = num_samples * output_layout_.num_channels; - auto input_frame = ffmpeg::create_frame(); - - input_frame->channels = input_layout_.num_channels; - input_frame->channel_layout = ffmpeg::create_channel_layout_bitmask(input_layout_.num_channels); - input_frame->sample_rate = 48000; - input_frame->nb_samples = static_cast(num_samples); - input_frame->format = AV_SAMPLE_FMT_S32; - input_frame->pts = 0; - - av_samples_fill_arrays( - input_frame->extended_data, - input_frame->linesize, - reinterpret_cast(input.data()), - input_frame->channels, - input_frame->nb_samples, - static_cast(input_frame->format), - 16); - - filter_->push(0, input_frame); + + filter_->push(0, boost::make_iterator_range(input)); auto frames = filter_->poll_all(0);