[FFmpeg-devel] [PATCH] mem: workaround alloc bug in OSX

Michael Niedermayer michaelni at gmx.at
Tue Feb 5 17:43:40 CET 2013


Fixes Ticket2229

Untested

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavutil/mem.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavutil/mem.c b/libavutil/mem.c
index 250b5f7..e3572cd 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
@@ -120,6 +120,7 @@ void *av_malloc(size_t size)
      * BTW, malloc seems to do 8-byte alignment by default here.
      */
 #else
+    if (size) //OS X has a broken malloc implementation
     ptr = malloc(size);
 #endif
     if(!ptr && !size) {
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list