diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-06-07 00:59:23 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-06-07 05:17:42 +0400 |
commit | a39bd458a0df295df59242a8e18e1e5313bd3318 (patch) | |
tree | 21ebd350c9149306f9a45c1a2f22661244487342 | |
parent | d58ed64a8953d07f33259317a2ea5856d0c91dfd (diff) |
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@gmx.at>
-rw-r--r-- | libavutil/mem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavutil/mem.c b/libavutil/mem.c index 29ecbfa055..87c2008a27 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 |