[FFmpeg-cvslog] mem: Don't abort on av_malloc(0) in debug mode

Martin Storsjö git at videolan.org
Tue Jul 10 21:35:38 CEST 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Wed Apr 11 10:33:43 2012 +0300| [620b1e7e989e71825858c621fa96a7e0a742d239] | committer: Martin Storsjö

mem: Don't abort on av_malloc(0) in debug mode

This makes the behaviour consistent between debug and release mode.

Signed-off-by: Martin Storsjö <martin at martin.st>

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

 libavutil/mem.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/libavutil/mem.c b/libavutil/mem.c
index 0fe9f54..3769da7 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
@@ -68,8 +68,6 @@ void *av_malloc(size_t size)
     long diff;
 #endif
 
-    assert(size);
-
     /* let's disallow possible ambiguous cases */
     if (size > (INT_MAX-32) || !size)
         return NULL;



More information about the ffmpeg-cvslog mailing list