summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-02-09 22:21:31 +0000
committerCarl Hetherington <cth@carlh.net>2014-02-09 22:21:31 +0000
commite4b65ba64c319281d6bff15e950ebce697c9621a (patch)
tree978bf1f27d4cb65496f336c23cfb412c083a45c5 /src/lib/ffmpeg.cc
parent8322da2c2ff305103ab1b180e79f470d30366699 (diff)
Fix 1 crash on low memory.
Diffstat (limited to 'src/lib/ffmpeg.cc')
-rw-r--r--src/lib/ffmpeg.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc
index b7ae04b06..fae9baa2b 100644
--- a/src/lib/ffmpeg.cc
+++ b/src/lib/ffmpeg.cc
@@ -26,6 +26,7 @@ extern "C" {
#include "ffmpeg.h"
#include "ffmpeg_content.h"
#include "exceptions.h"
+#include "util.h"
#include "i18n.h"
@@ -85,7 +86,7 @@ FFmpeg::setup_general ()
av_register_all ();
_file_group.set_paths (_ffmpeg_content->paths ());
- _avio_buffer = static_cast<uint8_t*> (av_malloc (_avio_buffer_size));
+ _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);
_format_context = avformat_alloc_context ();
_format_context->pb = _avio_context;