diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-06-28 03:40:35 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-06-28 13:14:12 +0200 |
commit | afe03092dd693d025d43e1620283d8d285c92772 (patch) | |
tree | d9719abbd51fb46f0fbbcfb6140c2e98b5ff2a1a /libavcodec/put_bits.h | |
parent | 07c52e2c7c60b087fd023cd9771778973def0b33 (diff) | |
download | ffmpeg-afe03092dd693d025d43e1620283d8d285c92772.tar.gz |
lavc: move put_bits_left in put_bits.h
Diffstat (limited to 'libavcodec/put_bits.h')
-rw-r--r-- | libavcodec/put_bits.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ -75,6 +75,14 @@ static inline int put_bits_count(PutBitContext *s) } /** + * @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. */ static inline void flush_put_bits(PutBitContext *s) |