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:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-05-10 10:06:53 +0400
committerLukasz Marek <lukasz.m.luki2@gmail.com>2014-05-20 02:00:44 +0400
commit7336e39f3cd2833786b0ebcca5604e13d2f86500 (patch)
treeea7365b22575f5a411f6ec1f1351adcfade2f1cd /libavutil/fifo.h
parentd43c303038e9bd9c7d1856234d81e6fc5b410c3f (diff)
lavu/fifo: add av_fifo_alloc_array function
Allows to alloc fifo buffer by passing number of elements and size of element. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'libavutil/fifo.h')
-rw-r--r--libavutil/fifo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavutil/fifo.h b/libavutil/fifo.h
index f0b11094d0..dda7dd2e96 100644
--- a/libavutil/fifo.h
+++ b/libavutil/fifo.h
@@ -42,6 +42,14 @@ typedef struct AVFifoBuffer {
AVFifoBuffer *av_fifo_alloc(unsigned int size);
/**
+ * Initialize an AVFifoBuffer.
+ * @param nmemb number of elements
+ * @param size size of the single element
+ * @return AVFifoBuffer or NULL in case of memory allocation failure
+ */
+AVFifoBuffer *av_fifo_alloc_array(size_t nmemb, size_t size);
+
+/**
* Free an AVFifoBuffer.
* @param f AVFifoBuffer to free
*/