avwrapper: Explicitly check for macro existence
authorkoda
Mon, 16 Nov 2015 18:28:10 +0100
changeset 11406 7012234df6c4
parent 11405 fac466eb0c4d
child 11407 bea08a303cb7
avwrapper: Explicitly check for macro existence
hedgewars/avwrapper/avwrapper.c
--- a/hedgewars/avwrapper/avwrapper.c	Mon Nov 16 16:01:57 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