[x264-devel] commit: Fix link errors with newest gpac cvs (Yusuke Nakamura )

git at videolan.org git at videolan.org
Sun Mar 28 04:44:24 CEST 2010


x264 | branch: master | Yusuke Nakamura <muken.the.vfrmaniac at gmail.com> | Sat Mar  6 19:24:32 2010 +0900| [d0c898a7a737c9a87cefc14b21bc6cfd44cc6b16] | committer: Jason Garrett-Glaser 

Fix link errors with newest gpac cvs
gpac decided to randomly break API and require us to use their own custom malloc and free.

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

 configure    |    3 +++
 output/mp4.c |    7 +++++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 8ed83ab..165bb95 100755
--- a/configure
+++ b/configure
@@ -597,6 +597,9 @@ if [ "$mp4_output" = "auto" ] ; then
 fi
 if [ "$mp4_output" = "yes" ] ; then
     define MP4_OUTPUT
+    if cc_check gpac/isomedia.h "-Werror $MP4_LDFLAGS" "gf_malloc(1); gf_free(NULL);" ; then
+        define HAVE_GF_MALLOC
+    fi
     LDFLAGSCLI="$LDFLAGSCLI $MP4_LDFLAGS"
 fi
 
diff --git a/output/mp4.c b/output/mp4.c
index c5e1988..548868a 100644
--- a/output/mp4.c
+++ b/output/mp4.c
@@ -24,6 +24,13 @@
 #include "muxers.h"
 #include <gpac/isomedia.h>
 
+#ifdef HAVE_GF_MALLOC
+#undef malloc
+#undef free
+#define malloc gf_malloc
+#define free gf_free
+#endif
+
 typedef struct
 {
     GF_ISOFile *p_file;



More information about the x264-devel mailing list