diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-04-19 21:23:08 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-04-19 21:23:08 +0400 |
commit | 349b71fd02354a3d1288bccbb2d984d5f9a7e605 (patch) | |
tree | a54f8a5f9cefafd11d8191f1fa658a5b300a3f55 /intern/ffmpeg | |
parent | fba67abf7a9caf8ccfa03af38d91f70de8875d2d (diff) |
Bring back support of FFmpeg >= 0.7
After planar codecs support minimal FFmpeg was
bumped to 0.10 which was not so much nice because
it was only released only later last year.
Didn't find a way to make compatibility code local
in ffmpeg_compat, so there're some ifdefs in
audaspace and writeffmpeg.
Not entirely happy, but having a bit of ifdefs in
code better than lots of real PITA for platform
maintainers.
Diffstat (limited to 'intern/ffmpeg')
-rw-r--r-- | intern/ffmpeg/ffmpeg_compat.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h index e072796abc4..0f97d1d42cc 100644 --- a/intern/ffmpeg/ffmpeg_compat.h +++ b/intern/ffmpeg/ffmpeg_compat.h @@ -76,9 +76,26 @@ #define FFMPEG_HAVE_CANON_H264_RESOLUTION_FIX #endif +#if ((LIBAVCODEC_VERSION_MAJOR > 53) || (LIBAVCODEC_VERSION_MAJOR >= 53) && (LIBAVCODEC_VERSION_MINOR >= 60)) +#define FFMPEG_HAVE_ENCODE_AUDIO2 +#endif + +#if ((LIBAVCODEC_VERSION_MAJOR > 53) || (LIBAVCODEC_VERSION_MAJOR >= 53) && (LIBAVCODEC_VERSION_MINOR >= 42)) +#define FFMPEG_HAVE_DECODE_AUDIO4 +#endif + #if ((LIBAVUTIL_VERSION_MAJOR > 51) || (LIBAVUTIL_VERSION_MAJOR == 51) && (LIBAVUTIL_VERSION_MINOR >= 32)) #define FFMPEG_FFV1_ALPHA_SUPPORTED #define FFMPEG_SAMPLE_FMT_S16P_SUPPORTED +#else + +static inline +int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) +{ + /* no planar formats in FFmpeg < 0.9 */ + return 0; +} + #endif static inline |