diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-14 19:54:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-15 18:08:32 +0200 |
commit | f8196759b45d658fd67064c83e18da1cc871e205 (patch) | |
tree | 11709d3b4d3495eeea939856dc6676aa70cee339 /libavutil/fifo.h | |
parent | b9777797be2f4a49894e682ad83f680b563e23d5 (diff) | |
download | ffmpeg-f8196759b45d658fd67064c83e18da1cc871e205.tar.gz |
fifo: add av_fifo_grow()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/fifo.h')
-rw-r--r-- | libavutil/fifo.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavutil/fifo.h b/libavutil/fifo.h index 22a9aa5d18..515f0980a7 100644 --- a/libavutil/fifo.h +++ b/libavutil/fifo.h @@ -103,6 +103,17 @@ int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size); /** + * Enlarge an AVFifoBuffer. + * In case of reallocation failure, the old FIFO is kept unchanged. + * The new fifo size may be larger than the requested size. + * + * @param f AVFifoBuffer to resize + * @param additional_space the amount of space in bytes to allocate in addition to av_fifo_size() + * @return <0 for failure, >=0 otherwise + */ +int av_fifo_grow(AVFifoBuffer *f, unsigned int additional_space); + +/** * Read and discard the specified amount of data from an AVFifoBuffer. * @param f AVFifoBuffer to read from * @param size amount of data to read in bytes |