Fix font_id_map errors when importing DCP subtitles that have no
[dcpomatic.git] / src / lib / audio_filter_graph.cc
index fc43b5a344a972a9ef20d69e1257441024616412..d9e4e244fd23aa4527d25f1840a21ec37a7b3512 100644 (file)
@@ -18,8 +18,9 @@
 
 */
 
-#include "audio_filter_graph.h"
+
 #include "audio_buffers.h"
+#include "audio_filter_graph.h"
 #include "compose.hpp"
 extern "C" {
 #include <libavfilter/buffersink.h>
@@ -31,9 +32,12 @@ extern "C" {
 
 #include "i18n.h"
 
-using std::string;
+
 using std::cout;
+using std::make_shared;
 using std::shared_ptr;
+using std::string;
+
 
 AudioFilterGraph::AudioFilterGraph (int sample_rate, int channels)
        : _sample_rate (sample_rate)
@@ -102,7 +106,7 @@ AudioFilterGraph::sink_name () const
 }
 
 void
-AudioFilterGraph::process (shared_ptr<const AudioBuffers> buffers)
+AudioFilterGraph::process (shared_ptr<AudioBuffers> buffers)
 {
        DCPOMATIC_ASSERT (buffers->frames() > 0);
        int const process_channels = av_get_channel_layout_nb_channels (_channel_layout);
@@ -113,7 +117,7 @@ AudioFilterGraph::process (shared_ptr<const AudioBuffers> buffers)
                   the constructor) so we need to create new buffers with some extra
                   silent channels.
                */
-               shared_ptr<AudioBuffers> extended_buffers (new AudioBuffers (process_channels, buffers->frames()));
+               auto extended_buffers = make_shared<AudioBuffers>(process_channels, buffers->frames());
                for (int i = 0; i < buffers->channels(); ++i) {
                        extended_buffers->copy_channel_from (buffers.get(), i, i);
                }