diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/ffmpeg.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index 8dc525db9..8eb19816c 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -116,7 +116,13 @@ FFmpeg::setup_general () _file_group.set_paths (_ffmpeg_content->paths ()); _avio_buffer = static_cast<uint8_t*> (wrapped_av_malloc (_avio_buffer_size)); _avio_context = avio_alloc_context (_avio_buffer, _avio_buffer_size, 0, this, avio_read_wrapper, 0, avio_seek_wrapper); + if (!_avio_context) { + throw std::bad_alloc (); + } _format_context = avformat_alloc_context (); + if (!_format_context) { + throw std::bad_alloc (); + } _format_context->pb = _avio_context; AVDictionary* options = 0; |
