Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-24 20:39:13 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-09-25 02:55:25 +0400
commitccecab4a0d7f3f4f296551c2e22bbf12af7d14e8 (patch)
tree8997ff2d09077d60ae4523cdac6127a4fddab89f /libavutil/mem.h
parent35cb6854bb76b4a5b6f2aea2dce81e18d7ab61cd (diff)
Add av_calloc() helper.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/mem.h')
-rw-r--r--libavutil/mem.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavutil/mem.h b/libavutil/mem.h
index 8fdf5b3a4d..1711b18658 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -107,6 +107,18 @@ void av_free(void *ptr);
void *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1);
/**
+ * Allocate a block of nmemb * size bytes with alignment suitable for all
+ * memory accesses (including vectors if available on the CPU) and
+ * zero all the bytes of the block.
+ * The allocation will fail if nmemb * size is greater than or equal
+ * to INT_MAX.
+ * @param nmemb
+ * @param size
+ * @return Pointer to the allocated block, NULL if it cannot be allocated.
+ */
+void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib;
+
+/**
* Duplicate the string s.
* @param s string to be duplicated
* @return Pointer to a newly allocated string containing a