aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/get_bits.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2009-11-09 22:10:43 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2009-11-09 22:10:43 +0000
commitc47ca25e74bbe465cdc8b99d4f6ab4f0ad5e4229 (patch)
tree53c03e2fa17603c936aec7f42179a48b7b0e5ab4 /libavcodec/get_bits.h
parentb1ade3d1821a29174963b28cd0caa5f7ed394998 (diff)
downloadffmpeg-c47ca25e74bbe465cdc8b99d4f6ab4f0ad5e4229.tar.gz
Make get_bits_left() available for use in libavcodec (was previously held
private in dv.c for some reason). See "[PATCH] get_bits_left()" thread. Originally committed as revision 20490 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/get_bits.h')
-rw-r--r--libavcodec/get_bits.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index 36beecd674..1863e7de4a 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -702,4 +702,9 @@ static inline int decode210(GetBitContext *gb){
return 2 - get_bits1(gb);
}
+static inline int get_bits_left(GetBitContext *gb)
+{
+ return gb->size_in_bits - get_bits_count(gb);
+}
+
#endif /* AVCODEC_GET_BITS_H */