]> git.sesse.net Git - casparcg/blobdiff - modules/ffmpeg/audio_channel_remapper.cpp
[ffmpeg] Remove redundant av_frame_alloc()/av_frame_free() RAII pairs all over the...
[casparcg] / modules / ffmpeg / audio_channel_remapper.cpp
index a49395a870cbeab8f4d89f15eff7482cdc78762a..920aa7203d17d0baca4e33b10bc60fd43586c3bd 100644 (file)
@@ -166,11 +166,7 @@ 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                        =       std::shared_ptr<AVFrame>(av_frame_alloc(), [](AVFrame* p)
-                                                                               {
-                                                                                       if (p)
-                                                                                               av_frame_free(&p);
-                                                                               });
+               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);