[FFmpeg-cvslog] Make av_realloc(0) behave like our av_malloc(0)

Michael Niedermayer git at videolan.org
Sat May 7 16:23:57 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May  7 15:28:07 2011 +0200| [91ff05f6ac5c65a6cd3701d5a7cdcfb6ccfd87e4] | committer: Michael Niedermayer

Make av_realloc(0) behave like our av_malloc(0)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavutil/mem.c b/libavutil/mem.c
index 965daa9..83e8c35 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
@@ -132,7 +132,7 @@ void *av_realloc(void *ptr, size_t size)
     diff= ((char*)ptr)[-1];
     return (char*)realloc((char*)ptr - diff, size + diff) + diff;
 #else
-    return realloc(ptr, size);
+    return realloc(ptr, size + !size);
 #endif
 }
 



More information about the ffmpeg-cvslog mailing list