decoder/ffmpeg: require at least version 11.12

This is the version in Debian Jessie (oldstable).
This commit is contained in:
Max Kellermann
2018-08-02 20:18:19 +02:00
parent 027e562f65
commit 69f4178bff
4 changed files with 2 additions and 42 deletions

View File

@@ -22,15 +22,6 @@
extern "C" {
#include <libavutil/mem.h>
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 18, 0)
#define HAVE_AV_FAST_MALLOC
#else
#include <libavcodec/avcodec.h>
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 25, 0)
#define HAVE_AV_FAST_MALLOC
#endif
#endif
}
#include <stddef.h>
@@ -53,14 +44,7 @@ public:
gcc_malloc
void *Get(size_t min_size) {
#ifdef HAVE_AV_FAST_MALLOC
av_fast_malloc(&data, &size, min_size);
#else
void *new_data = av_fast_realloc(data, &size, min_size);
if (new_data == nullptr)
return AVERROR(ENOMEM);
data = new_data;
#endif
return data;
}