]> git.sesse.net Git - x264/commitdiff
Fix link errors with newest gpac cvs
authorYusuke Nakamura <muken.the.vfrmaniac@gmail.com>
Sat, 6 Mar 2010 10:24:32 +0000 (19:24 +0900)
committerFiona Glaser <fiona@x264.com>
Sat, 27 Mar 2010 19:47:09 +0000 (12:47 -0700)
gpac decided to randomly break API and require us to use their own custom malloc and free.

configure
output/mp4.c

index 8ed83abc749b01bd57968e389e413842eac8f151..165bb95afef604dd0b302a1069ba9492c1575eee 100755 (executable)
--- 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
 
index c5e19887f909e69248b33bb5f2f06cbbedb1e5b5..548868aae3a3606d889fa09d15c70e990a1990c8 100644 (file)
 #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;