Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2019-06-29 07:53:58 +0300
committerRay Molenkamp <github@lazydodo.com>2019-06-29 07:53:58 +0300
commit71086995a552d41be361e49e7c3f3cfbfffa4dac (patch)
tree607a98aff4c837e5faa7c154417f7fe2828c24f8 /source/blender/blenkernel/intern/writeffmpeg.c
parent97e3af9a05a35785e0b38bfd7a793871a94d29e3 (diff)
Cleanup: Fix build warnings with MSVC.
ffmpeg defines some of the math constants if they are not found before including any of its headers, this lead to a build warnings about M_E, M_LN2 and M_SQRT1_2 being redefined once BLI_math_base.h gets included.
Diffstat (limited to 'source/blender/blenkernel/intern/writeffmpeg.c')
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index e31e7fb5b63..345d9ce1193 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -25,12 +25,6 @@
# include <stdlib.h>
-# include <libavformat/avformat.h>
-# include <libavcodec/avcodec.h>
-# include <libavutil/rational.h>
-# include <libavutil/samplefmt.h>
-# include <libswscale/swscale.h>
-
# include "MEM_guardedalloc.h"
# include "DNA_scene_types.h"
@@ -56,6 +50,14 @@
# include "IMB_imbuf.h"
+/* This needs to be included after BLI_math_base.h otherwise it will redefine some math defines
+ * like M_SQRT1_2 leading to warnings with MSVC */
+# include <libavformat/avformat.h>
+# include <libavcodec/avcodec.h>
+# include <libavutil/rational.h>
+# include <libavutil/samplefmt.h>
+# include <libswscale/swscale.h>
+
# include "ffmpeg_compat.h"
struct StampData;