[vlc-commits] vlc_boxes: add bo_size

Francois Cartegnie git at videolan.org
Thu Jan 25 14:35:57 CET 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan 23 15:26:38 2018 +0100| [23f4fbdd86873612dc34dc372cae0d7abcd9beb8] | committer: Francois Cartegnie

vlc_boxes: add bo_size

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

 include/vlc_boxes.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/vlc_boxes.h b/include/vlc_boxes.h
index aa02ffa25a..69c26c027f 100644
--- a/include/vlc_boxes.h
+++ b/include/vlc_boxes.h
@@ -160,6 +160,11 @@ static inline bool bo_add_mem(bo_t *p_bo, size_t i_size, const void *p_mem)
     return true;
 }
 
+static inline size_t bo_size(const bo_t *p_bo)
+{
+    return (p_bo->b) ? p_bo->b->i_buffer : 0;
+}
+
 #define bo_add_fourcc(p_bo, fcc) bo_add_mem(p_bo, 4, fcc)
 
 #endif // VLC_BOXES_H



More information about the vlc-commits mailing list