diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-27 23:13:24 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-27 23:13:24 +0200 |
| commit | 452e4844326048da0f1fdc8dbf623b43cb400798 (patch) | |
| tree | 61d740662003775a440c833321902efbeac3cbcf | |
| parent | 0dfae427c15dc7fde495567d7dcbd04be80342b5 (diff) | |
Throw exception if av_frame_alloc() fails.
| -rw-r--r-- | src/lib/audio_filter_graph.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/audio_filter_graph.cc b/src/lib/audio_filter_graph.cc index d9e4e244f..73c3aa6f7 100644 --- a/src/lib/audio_filter_graph.cc +++ b/src/lib/audio_filter_graph.cc @@ -53,6 +53,9 @@ AudioFilterGraph::AudioFilterGraph (int sample_rate, int channels) } _in_frame = av_frame_alloc (); + if (_in_frame == nullptr) { + throw std::bad_alloc(); + } } AudioFilterGraph::~AudioFilterGraph() |
