[vlc-devel] commit: Added a missing block_BytestreamEmpty helper. (Laurent Aimar )

git version control git at videolan.org
Mon Feb 9 21:09:09 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Feb  8 16:52:27 2009 +0100| [d042c1292f5f52bbfe4103e11b1706471cf6e8c8] | committer: Laurent Aimar 

Added a missing block_BytestreamEmpty helper.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d042c1292f5f52bbfe4103e11b1706471cf6e8c8
---

 include/vlc_block_helper.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/include/vlc_block_helper.h b/include/vlc_block_helper.h
index 376c2b4..654d26b 100644
--- a/include/vlc_block_helper.h
+++ b/include/vlc_block_helper.h
@@ -60,6 +60,19 @@ static inline void block_BytestreamRelease( block_bytestream_t *p_bytestream )
     p_bytestream->p_chain = p_bytestream->p_block = NULL;
 }
 
+/**
+ * It flush all data (read and unread) from a block_bytestream_t.
+ */
+static inline void block_BytestreamEmpty( block_bytestream_t *p_bytestream )
+{
+    block_BytestreamRelease( p_bytestream );
+
+    *p_bytestream = block_BytestreamInit();
+}
+
+/**
+ * It flushes all already read data from a block_bytestream_t.
+ */
 static inline void block_BytestreamFlush( block_bytestream_t *p_bytestream )
 {
     while( p_bytestream->p_chain != p_bytestream->p_block )




More information about the vlc-devel mailing list