[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28793] trunk/blender/intern/audaspace: Fix for compilation with newer ffmpeg library
Sergey Sharybin
g.ulairi at gmail.com
Sun May 16 21:41:50 CEST 2010
Revision: 28793
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28793
Author: nazgul
Date: 2010-05-16 21:41:49 +0200 (Sun, 16 May 2010)
Log Message:
-----------
Fix for compilation with newer ffmpeg library
Error was cased by undefined UINT64_C in stdint.h for c++
programs. As I understand from ffmpeg mailing list the simpliest
solution is to define __STDC_CONSTANT_MACROS before including
ffmpeg libraries. There already was some amout of such definitions in
the code and I've tested this with newer and older ffmpeg
libraries -- this should work and should be safe, but maybe
there is better way of fixing this problem.
Modified Paths:
--------------
trunk/blender/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp
trunk/blender/intern/audaspace/intern/AUD_C-API.cpp
trunk/blender/intern/audaspace/intern/AUD_FileFactory.cpp
Modified: trunk/blender/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp
===================================================================
--- trunk/blender/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp 2010-05-16 17:01:05 UTC (rev 28792)
+++ trunk/blender/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp 2010-05-16 19:41:49 UTC (rev 28793)
@@ -23,6 +23,9 @@
* ***** END LGPL LICENSE BLOCK *****
*/
+// needed for INT64_C
+#define __STDC_CONSTANT_MACROS
+
#include "AUD_FFMPEGFactory.h"
#include "AUD_FFMPEGReader.h"
#include "AUD_Buffer.h"
Modified: trunk/blender/intern/audaspace/intern/AUD_C-API.cpp
===================================================================
--- trunk/blender/intern/audaspace/intern/AUD_C-API.cpp 2010-05-16 17:01:05 UTC (rev 28792)
+++ trunk/blender/intern/audaspace/intern/AUD_C-API.cpp 2010-05-16 19:41:49 UTC (rev 28793)
@@ -27,6 +27,11 @@
#include <cstring>
#include <cmath>
+#ifdef WITH_FFMPEG
+// needed for INT64_C
+#define __STDC_CONSTANT_MACROS
+#endif
+
#include "AUD_NULLDevice.h"
#include "AUD_I3DDevice.h"
#include "AUD_FileFactory.h"
@@ -62,6 +67,7 @@
#include "AUD_JackDevice.h"
#endif
+
#ifdef WITH_FFMPEG
extern "C" {
#include <libavformat/avformat.h>
Modified: trunk/blender/intern/audaspace/intern/AUD_FileFactory.cpp
===================================================================
--- trunk/blender/intern/audaspace/intern/AUD_FileFactory.cpp 2010-05-16 17:01:05 UTC (rev 28792)
+++ trunk/blender/intern/audaspace/intern/AUD_FileFactory.cpp 2010-05-16 19:41:49 UTC (rev 28793)
@@ -29,6 +29,9 @@
#include <cstring>
#ifdef WITH_FFMPEG
+// needed for INT64_C
+#define __STDC_CONSTANT_MACROS
+
#include "AUD_FFMPEGReader.h"
#endif
#ifdef WITH_SNDFILE
More information about the Bf-blender-cvs
mailing list