From d0c898a7a737c9a87cefc14b21bc6cfd44cc6b16 Mon Sep 17 00:00:00 2001 From: Yusuke Nakamura Date: Sat, 6 Mar 2010 19:24:32 +0900 Subject: [PATCH] Fix link errors with newest gpac cvs gpac decided to randomly break API and require us to use their own custom malloc and free. --- configure | 3 +++ output/mp4.c | 7 +++++++ 2 files changed, 10 insertions(+) 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; -- 2.47.3