[vlc-commits] vlc_bits: add bo_deinit

Thomas Guillem git at videolan.org
Thu Jul 30 13:40:46 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jul 30 10:43:50 2015 +0200| [4ca4c7e8daa289761ddd4c9e6e7d50e08b99d71a] | committer: Thomas Guillem

vlc_bits: add bo_deinit

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

 include/vlc_bits.h |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/vlc_bits.h b/include/vlc_bits.h
index aaf5c13..90e19d2 100644
--- a/include/vlc_bits.h
+++ b/include/vlc_bits.h
@@ -217,12 +217,17 @@ static inline bool bo_init(bo_t *p_bo, int i_size)
     return true;
 }
 
+static inline void bo_deinit(bo_t *p_bo)
+{
+    if(p_bo->b)
+        block_Release(p_bo->b);
+}
+
 static inline void bo_free(bo_t *p_bo)
 {
     if(!p_bo)
         return;
-    if(p_bo->b)
-        block_Release(p_bo->b);
+    bo_deinit(p_bo);
     free(p_bo);
 }
 



More information about the vlc-commits mailing list