From afe03092dd693d025d43e1620283d8d285c92772 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Fri, 28 Jun 2013 03:40:35 +0200 Subject: lavc: move put_bits_left in put_bits.h --- libavcodec/put_bits.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libavcodec/put_bits.h') diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h index 6ea05929c8..e3412cb7ec 100644 --- a/libavcodec/put_bits.h +++ b/libavcodec/put_bits.h @@ -74,6 +74,14 @@ static inline int put_bits_count(PutBitContext *s) return (s->buf_ptr - s->buf) * 8 + 32 - s->bit_left; } +/** + * @return the number of bits available in the bitstream. + */ +static inline int put_bits_left(PutBitContext* s) +{ + return (s->buf_end - s->buf_ptr) * 8 - 32 + s->bit_left; +} + /** * Pad the end of the output stream with zeros. */ -- cgit v1.2.1