diff options
Diffstat (limited to 'src/combined/ffmpeg/ffmpeg_compat.h')
-rw-r--r-- | src/combined/ffmpeg/ffmpeg_compat.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/combined/ffmpeg/ffmpeg_compat.h b/src/combined/ffmpeg/ffmpeg_compat.h index 69b9aa30e..f025dfec6 100644 --- a/src/combined/ffmpeg/ffmpeg_compat.h +++ b/src/combined/ffmpeg/ffmpeg_compat.h @@ -24,10 +24,14 @@ #define XINE_AVCODEC_COMPAT_H #ifndef LIBAVCODEC_VERSION_MAJOR -# error ffmpeg headers must be included first ! +# ifdef LIBAVCODEC_VERSION_INT +# define LIBAVCODEC_VERSION_MAJOR ((LIBAVCODEC_VERSION_INT)>>16) +# define LIBAVCODEC_VERSION_MINOR (((LIBAVCODEC_VERSION_INT)>>8) & 0xff) +# else +# error ffmpeg headers must be included first ! +# endif #endif - #if LIBAVCODEC_VERSION_MAJOR > 51 # define bits_per_sample bits_per_coded_sample #endif @@ -44,6 +48,11 @@ # undef AVCODEC_HAS_REORDERED_OPAQUE #endif +/* colorspace and color_range were added before 52.29.0 */ +#if LIBAVCODEC_VERSION_MAJOR > 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 29) +# define AVCODEC_HAS_COLORSPACE +#endif + /**/ #if LIBAVCODEC_VERSION_MAJOR > 53 || (LIBAVCODEC_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR >= 8) # define avcodec_init() do {} while(0) |