summaryrefslogtreecommitdiff
path: root/libavutil/fifo.h
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-03-09 09:26:32 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-03-09 09:26:32 +0000
commit32b936d0c368db467be1c0501b36d9a995545675 (patch)
treeb97b05a2f537c404ac25d60275aae2b53b0ca44a /libavutil/fifo.h
parentaa033b1ed76269f56e602a42b6fdd8dfe7cb4768 (diff)
Add av_fifo_reset function to completely reset fifo state, which makes
it easier to reuse the fifo. Originally committed as revision 17901 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/fifo.h')
-rw-r--r--libavutil/fifo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/fifo.h b/libavutil/fifo.h
index 9ba7e700fc..f64914f7c6 100644
--- a/libavutil/fifo.h
+++ b/libavutil/fifo.h
@@ -48,6 +48,12 @@ AVFifoBuffer *av_fifo_alloc(unsigned int size);
void av_fifo_free(AVFifoBuffer *f);
/**
+ * Resets the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied.
+ * @param *f AVFifoBuffer to reset
+ */
+void av_fifo_reset(AVFifoBuffer *f);
+
+/**
* Returns the amount of data in bytes in the AVFifoBuffer, that is the
* amount of data you can read from it.
* @param *f AVFifoBuffer to read from