aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mem.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-01-21 21:30:48 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-01-21 21:30:48 +0000
commitb7a22d846b581bfd9eebf8710eeefa1948495db9 (patch)
treeef7c0114a5c82d1cd09663de5c12676da9ba81d7 /libavcodec/mem.c
parent68f593b48433842f3407586679fe07f3e5199ab9 (diff)
downloadffmpeg-b7a22d846b581bfd9eebf8710eeefa1948495db9.tar.gz
cleanup
Originally committed as revision 1487 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mem.c')
-rw-r--r--libavcodec/mem.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/mem.c b/libavcodec/mem.c
index 0c876a851e..e59b25a223 100644
--- a/libavcodec/mem.c
+++ b/libavcodec/mem.c
@@ -71,6 +71,17 @@ void *av_malloc(unsigned int size)
return ptr;
}
+/**
+ * realloc which does nothing if the block is large enogh
+ */
+void *av_fast_realloc(void *ptr, int *size, int min_size){
+ if(min_size < *size) return ptr;
+
+ *size= min_size + 10*1024;
+
+ return realloc(ptr, *size);
+}
+
/* NOTE: ptr = NULL is explicetly allowed */
void av_free(void *ptr)
{