This can be used to simplify code in a couple of places.
Signed-off-by: Andreas Cadhalpun <[email protected]>
---
libavcodec/get_bits.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index 0a61c80..f984d3e 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -269,6 +269,14 @@ static inline unsigned int get_bits(GetBitContext *s, int
n)
return tmp;
}
+/**
+ * Read 0-25 bits.
+ */
+static inline int get_bitsz(GetBitContext *s, int n)
+{
+ return n ? get_bits(s, n) : 0;
+}
+
static inline unsigned int get_bits_le(GetBitContext *s, int n)
{
register int tmp;
--
2.6.4
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel