[FFmpeg-cvslog] mem: Trying to workaround posix_memalign() bug on OSX

Michael Niedermayer git at videolan.org
Tue Jun 7 03:33:04 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jun  6 22:59:23 2011 +0200| [a39bd458a0df295df59242a8e18e1e5313bd3318] | committer: Michael Niedermayer

mem: Trying to workaround posix_memalign() bug on OSX

This patch is based on a patch by John Stebbins

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavutil/mem.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavutil/mem.c b/libavutil/mem.c
index 29ecbfa..87c2008 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
@@ -86,6 +86,7 @@ void *av_malloc(size_t size)
     ptr = (char*)ptr + diff;
     ((char*)ptr)[-1]= diff;
 #elif HAVE_POSIX_MEMALIGN
+    if (size) //OSX on SDK 10.6 has a broken posix_memalign implementation
     if (posix_memalign(&ptr,ALIGN,size))
         ptr = NULL;
 #elif HAVE_MEMALIGN



More information about the ffmpeg-cvslog mailing list