[vlc-commits] Add LIBAVUTIL_VERSION_CHECK (based on LIBAVCODEC_VERSION_CHECK)

Rafaël Carré git at videolan.org
Fri Jan 25 07:11:13 CET 2013


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Fri Jan 25 07:08:11 2013 +0100| [a92d777d0b430070ebc6aff422aec622323a59bf] | committer: Rafaël Carré

Add LIBAVUTIL_VERSION_CHECK (based on LIBAVCODEC_VERSION_CHECK)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a92d777d0b430070ebc6aff422aec622323a59bf
---

 modules/codec/avcodec/avcommon.h |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h
index 5aefbbf..5f47680 100644
--- a/modules/codec/avcodec/avcommon.h
+++ b/modules/codec/avcodec/avcommon.h
@@ -31,6 +31,15 @@
 
 #include <limits.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 ) )
+
+
 unsigned GetVlcDspMask( void );
 
 #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H



More information about the vlc-commits mailing list