[vlc-commits] Avcodec: fix FTBFS with older libav/FFmpeg

Jean-Baptiste Kempf git at videolan.org
Sat Jul 20 13:02:00 CEST 2013


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Jul 20 13:01:33 2013 +0200| [ea82b37f8f17028e29e812b2a12adc20feeb51d3] | committer: Jean-Baptiste Kempf

Avcodec: fix FTBFS with older libav/FFmpeg

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

 modules/codec/avcodec/avcommon.h        |    8 --------
 modules/codec/avcodec/avcommon_compat.h |   13 +++++++++++++
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h
index 90df890..cded40e 100644
--- a/modules/codec/avcodec/avcommon.h
+++ b/modules/codec/avcodec/avcommon.h
@@ -36,14 +36,6 @@
 
 #include "avcommon_compat.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 );
 
diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h
index e24873c..bd8cfa2 100644
--- a/modules/codec/avcodec/avcommon_compat.h
+++ b/modules/codec/avcodec/avcommon_compat.h
@@ -36,6 +36,15 @@
     ( (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 ) ) )
 
+/* 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 LIBAVCODEC_VERSION_MAJOR < 54
 #   define AV_PICTURE_TYPE_B        FF_B_TYPE
 #   define AV_PICTURE_TYPE_I        FF_I_TYPE
@@ -486,6 +495,10 @@ enum {
 #   define AV_CPU_FLAG_MMXEXT       AV_CPU_FLAG_MMX2
 #endif
 
+#if !LIBAVUTIL_VERSION_CHECK( 52, 11, 0, 32, 100 )
+#   define AV_PIX_FMT_FLAG_HWACCEL  PIX_FMT_HWACCEL
+#endif
+
 #endif /* HAVE_LIBAVUTIL_AVUTIL_H */
 
 #endif



More information about the vlc-commits mailing list