summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/put_bits.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/put_bits.h
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/put_bits.h')
-rw-r--r--ffmpeg/libavcodec/put_bits.h8
1 files changed, 8 insertions, 0 deletions
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
@@ -76,6 +76,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)