From: Yusuke Nakamura Date: Sat, 6 Mar 2010 10:24:32 +0000 (+0900) Subject: Fix link errors with newest gpac cvs X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=d0c898a7a737c9a87cefc14b21bc6cfd44cc6b16;p=x264.git Fix link errors with newest gpac cvs gpac decided to randomly break API and require us to use their own custom malloc and free. --- diff --git a/configure b/configure index 8ed83abc..165bb95a 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 c5e19887..548868aa 100644 --- a/output/mp4.c +++ b/output/mp4.c @@ -24,6 +24,13 @@ #include "muxers.h" #include +#ifdef HAVE_GF_MALLOC +#undef malloc +#undef free +#define malloc gf_malloc +#define free gf_free +#endif + typedef struct { GF_ISOFile *p_file;