_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;