diff options
author | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-05-10 08:06:53 +0200 |
---|---|---|
committer | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-05-20 00:00:44 +0200 |
commit | 7336e39f3cd2833786b0ebcca5604e13d2f86500 (patch) | |
tree | ea7365b22575f5a411f6ec1f1351adcfade2f1cd /libavutil/fifo.h | |
parent | d43c303038e9bd9c7d1856234d81e6fc5b410c3f (diff) | |
download | ffmpeg-7336e39f3cd2833786b0ebcca5604e13d2f86500.tar.gz |
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.h | 8 |
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 */ |