aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/put_bits.h
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2013-07-06 09:46:07 +0200
committerReinhard Tartler <siretart@tauware.de>2013-07-06 10:06:11 +0200
commitb20004b2e6165a6d5ef6bc6ae98d3d33c6460808 (patch)
treeed41caa3b360e3ace31833b52c176ddcabbb3598 /libavcodec/put_bits.h
parent0c943d1cdd18d0aea4ebc15f18a1152f7a77e5c9 (diff)
downloadffmpeg-b20004b2e6165a6d5ef6bc6ae98d3d33c6460808.tar.gz
lavc: move put_bits_left in put_bits.h
(cherry picked from commit afe03092dd693d025d43e1620283d8d285c92772) Signed-off-by: Reinhard Tartler <siretart@tauware.de> Conflicts: libavcodec/dv.c
Diffstat (limited to 'libavcodec/put_bits.h')
-rw-r--r--libavcodec/put_bits.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h
index 6e812670b8..905461a725 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -73,6 +73,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)