From 547342bf737c724641a75b86a16a97ddef2610da Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 1 Apr 2013 10:53:29 +0000 Subject: Hopefully compilation with FFmpeg 0.10 works fine now. --- intern/ffmpeg/ffmpeg_compat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h index 8663c96a22e..69e2e014761 100644 --- a/intern/ffmpeg/ffmpeg_compat.h +++ b/intern/ffmpeg/ffmpeg_compat.h @@ -110,6 +110,16 @@ int av_opt_set_double(void *obj, const char *name, double val, int search_flags) #define AV_OPT_TYPE_FLOAT FF_OPT_TYPE_FLOAT #endif +#if ((LIBAVUTIL_VERSION_MAJOR < 51) || (LIBAVUTIL_VERSION_MAJOR == 51) && (LIBAVUTIL_VERSION_MINOR < 54)) +static inline +enum AVSampleFormat av_get_packed_sample_fmt(enum AVSampleFormat sample_fmt) +{ + if (sample_fmt < 0 || sample_fmt >= AV_SAMPLE_FMT_NB) + return AV_SAMPLE_FMT_NONE; + return sample_fmt; +} +#endif + #if ((LIBAVFORMAT_VERSION_MAJOR < 53) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR < 24)) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR < 24) && (LIBAVFORMAT_VERSION_MICRO < 2))) #define avformat_close_input(x) av_close_input_file(*(x)) #endif -- cgit v1.2.3