]> git.sesse.net Git - vlc/commitdiff
avcodec: move version check to avcodec.h
authorIlkka Ollakka <ileoo@videolan.org>
Tue, 14 Aug 2012 13:20:52 +0000 (16:20 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Tue, 14 Aug 2012 13:24:43 +0000 (16:24 +0300)
modules/codec/avcodec/avcodec.h
modules/codec/avcodec/fourcc.c

index e5a58254fc0a4913d156946018d67658ee9bdcd7..34e00a6d81580a8f7b98c482adb39c4041859961 100644 (file)
@@ -278,6 +278,16 @@ int ffmpeg_OpenCodec( decoder_t *p_dec );
 #   define HAVE_AVCODEC_MT
 #endif
 
+
+/* 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 ) )
+
+
 /* Uncomment it to enable compilation with vaapi/dxva2/vda (you also must change the build
  * system) */
 //#define HAVE_AVCODEC_VAAPI 1
index eddd7e9e5e7185d3fa1e8b8d20150cd060436eaf..ad61157896eefe65a1120d13946b30c19090e291 100644 (file)
 #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
  *****************************************************************************/