[vlc-commits] vlc_bits: add bs_aligned

Francois Cartegnie git at videolan.org
Sun Dec 20 16:45:53 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Dec 20 16:33:14 2015 +0100| [e047c398d7f6ec26e5f6461eebafdfe137cafcb8] | committer: Francois Cartegnie

vlc_bits: add bs_aligned

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

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

diff --git a/include/vlc_bits.h b/include/vlc_bits.h
index 451b317..947a9d0 100644
--- a/include/vlc_bits.h
+++ b/include/vlc_bits.h
@@ -199,6 +199,11 @@ static inline void bs_write( bs_t *s, int i_count, uint32_t i_bits )
     }
 }
 
+static inline bool bs_aligned( bs_t *s )
+{
+    return s->i_left % 8 == 0;
+}
+
 static inline void bs_align( bs_t *s )
 {
     if( s->i_left != 8 )



More information about the vlc-commits mailing list