diff options
author | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-05-06 21:28:51 +0200 |
---|---|---|
committer | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-05-07 23:39:42 +0200 |
commit | 351f6118c7e3da6ea7a2ab0a8f7d25b2223f7c5a (patch) | |
tree | 24afeeeb5953cc0329e40f7ce9cc851da6933188 /libavutil/fifo.c | |
parent | 54ae58802e9829a8b62edcbea683fe89a8c6fcfa (diff) | |
download | ffmpeg-351f6118c7e3da6ea7a2ab0a8f7d25b2223f7c5a.tar.gz |
lavu/fifo: add av_fifo_freep function
Function allows to free fifo and reset freed pointer.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'libavutil/fifo.c')
-rw-r--r-- | libavutil/fifo.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavutil/fifo.c b/libavutil/fifo.c index 235b53ce40..e35237c090 100644 --- a/libavutil/fifo.c +++ b/libavutil/fifo.c @@ -45,6 +45,14 @@ void av_fifo_free(AVFifoBuffer *f) } } +void av_fifo_freep(AVFifoBuffer **f) +{ + if (f) { + av_fifo_free(*f); + *f = NULL; + } +} + void av_fifo_reset(AVFifoBuffer *f) { f->wptr = f->rptr = f->buffer; |