summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlo Bramini <carlo.bramix@libero.it>2012-06-05 11:41:03 +0300
committerCarlo Bramini <carlo.bramix@libero.it>2012-06-05 11:41:03 +0300
commit3b076d574b3e2ae13eebef53756014acf8b485df (patch)
tree0e88dfedc7ed9acde1a6a85502da6e978b76af34 /src
parent76c94adde0ea28971699d04116ba7d754036c0b9 (diff)
downloadxine-lib-3b076d574b3e2ae13eebef53756014acf8b485df.tar.gz
xine-lib-3b076d574b3e2ae13eebef53756014acf8b485df.tar.bz2
ffmpeg_compat.h: fixed version check for old ffmpeg versions
Diffstat (limited to 'src')
-rw-r--r--src/combined/ffmpeg/ffmpeg_compat.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/combined/ffmpeg/ffmpeg_compat.h b/src/combined/ffmpeg/ffmpeg_compat.h
index 69b9aa30e..f0a49d7f2 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