From f7813a5324be39d13ab536c245d15dfc602a7849 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 29 Dec 2013 12:19:38 +0000 Subject: basic type mechanism working --- ffmpeg/libavcodec/put_bits.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ffmpeg/libavcodec/put_bits.h') diff --git a/ffmpeg/libavcodec/put_bits.h b/ffmpeg/libavcodec/put_bits.h index 7320443..e2c4a61 100644 --- a/ffmpeg/libavcodec/put_bits.h +++ b/ffmpeg/libavcodec/put_bits.h @@ -75,6 +75,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.3