[vlc-commits] avcommon: Move the libavutil check where it belongs
Luca Barbato
git at videolan.org
Fri Oct 18 23:34:27 CEST 2013
vlc/vlc-2.1 | branch: master | Luca Barbato <lu_zero at gentoo.org> | Wed Oct 16 22:02:36 2013 +0200| [38aee7abe50c33e1822bee73bf2cffb4fd94d8b9] | committer: Jean-Baptiste Kempf
avcommon: Move the libavutil check where it belongs
Unbreak avformat-only builds.
Signed-off-by: Rafaël Carré <funman at videolan.org>
(cherry picked from commit c931473048eb066b1f06d6679a01c13a18e048ee)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=38aee7abe50c33e1822bee73bf2cffb4fd94d8b9
---
modules/codec/avcodec/avcommon_compat.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h
index e24873c..8f0efc1 100644
--- a/modules/codec/avcodec/avcommon_compat.h
+++ b/modules/codec/avcodec/avcommon_compat.h
@@ -482,6 +482,14 @@ enum {
#ifdef HAVE_LIBAVUTIL_AVUTIL_H
# include <libavutil/avutil.h>
+/* LIBAVUTIL_VERSION_CHECK checks for the right version of libav and FFmpeg
+ * a is the major version
+ * b and c the minor and micro versions of libav
+ * d and e the minor and micro versions of FFmpeg */
+#define LIBAVUTIL_VERSION_CHECK( a, b, c, d, e ) \
+ ( (LIBAVUTIL_VERSION_MICRO < 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \
+ (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) )
+
#if LIBAVUTIL_VERSION_MAJOR < 52 && !defined(AV_CPU_FLAG_MMXEXT)
# define AV_CPU_FLAG_MMXEXT AV_CPU_FLAG_MMX2
#endif
More information about the vlc-commits
mailing list