#include "audio_buffers.h"
#include "audio_filter_graph.h"
#include "compose.hpp"
+#include "dcpomatic_assert.h"
+#include "exceptions.h"
extern "C" {
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.h>
}
_in_frame = av_frame_alloc ();
+ if (_in_frame == nullptr) {
+ throw std::bad_alloc();
+ }
}
AudioFilterGraph::~AudioFilterGraph()
}
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);