vlc | branch: master | Jean-Baptiste Kempf <[email protected]> | Fri Jun  8 
16:25:52 2012 +0200| [5af1dfa53b892e21a24078cfd9e109d36bf0db6e] | committer: 
Jean-Baptiste Kempf

Avcodec: add a macro for version check working for libav and FFmpeg

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

 modules/codec/avcodec/fourcc.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c
index fc948ed..4837843 100644
--- a/modules/codec/avcodec/fourcc.c
+++ b/modules/codec/avcodec/fourcc.c
@@ -36,6 +36,14 @@
 #endif
 #include "avcodec.h"
 
+/* LIBAVCODEC_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 LIBAVCODEC_VERSION_CHECK( a, b, c, d, e ) \
+    (LIBAVCODEC_VERSION_MICRO <  100 && LIBAVCODEC_VERSION_INT >= 
AV_VERSION_INT( a, b, c ) ) || \
+    (LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= 
AV_VERSION_INT( a, d, e ) )
+
 /*****************************************************************************
  * Codec fourcc -> ffmpeg_id mapping
  *****************************************************************************/

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to