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:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-28 02:49:14 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-05-02 15:44:05 +0400
commit89b5039ff265e0519261b07aa9bdd3ed7df6090c (patch)
tree4c36ba5f31e07ef729e811b72137b0e356dc776d /libavutil/mem.h
parent663794f63da0baa059a6416d47945671dfa67462 (diff)
avutil/mem: add av_memdup()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/mem.h')
-rw-r--r--libavutil/mem.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavutil/mem.h b/libavutil/mem.h
index ced9453869..02395b792b 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -180,6 +180,14 @@ av_alloc_size(1, 2) static inline void *av_mallocz_array(size_t nmemb, size_t si
char *av_strdup(const char *s) av_malloc_attrib;
/**
+ * Duplicate the buffer p.
+ * @param p buffer to be duplicated
+ * @return Pointer to a newly allocated buffer containing a
+ * copy of p or NULL if the buffer cannot be allocated.
+ */
+void *av_memdup(const void *p, size_t size);
+
+/**
* Free a memory block which has been allocated with av_malloc(z)() or
* av_realloc() and set the pointer pointing to it to NULL.
* @param ptr Pointer to the pointer to the memory block which should