avwrapper: Explicitly check for macro existence 0.9.22
authorkoda
Mon, 16 Nov 2015 18:28:10 +0100
branch0.9.22
changeset 11603 06ecd48e65ef
parent 11602 1a57b0d4cc4e
child 11620 3ff4c021a24a
avwrapper: Explicitly check for macro existence
hedgewars/avwrapper/avwrapper.c
--- a/hedgewars/avwrapper/avwrapper.c	Sat Nov 07 15:07:33 2015 +0100
+++ b/hedgewars/avwrapper/avwrapper.c	Mon Nov 16 18:28:10 2015 +0100
@@ -79,10 +79,16 @@
 }
 #endif
 
-#if LIBAVCODEC_VERSION_MAJOR < 56
+#ifndef AV_CODEC_CAP_DELAY
 #define AV_CODEC_CAP_DELAY                  CODEC_CAP_DELAY
+#endif
+#ifndef AV_CODEC_CAP_VARIABLE_FRAME_SIZE
 #define AV_CODEC_CAP_VARIABLE_FRAME_SIZE    CODEC_CAP_VARIABLE_FRAME_SIZE
+#endif
+#ifndef AV_CODEC_FLAG_GLOBAL_HEADER
 #define AV_CODEC_FLAG_GLOBAL_HEADER         CODEC_FLAG_GLOBAL_HEADER
+#endif
+#ifndef AV_CODEC_FLAG_QSCALE
 #define AV_CODEC_FLAG_QSCALE                CODEC_FLAG_QSCALE
 #endif