[FFmpeg-devel] [PATCH] avcodec/get_bits: Document skip_bits_long()

Michael Niedermayer michael at niedermayer.cc
Fri Mar 23 21:20:35 EET 2018


Found-by: Kieran
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/get_bits.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index 0c7f5ff0c6..3ec45e7ab6 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -201,6 +201,13 @@ static inline int get_bits_count(const GetBitContext *s)
     return s->index;
 }
 
+/**
+ * Skips the specified number of bits.
+ * @param n the number of bits to skip,
+ *          For the UNCHECKED_BITSTREAM_READER this must not cause the distance
+ *          from the start to overflow int32_t. Staying within the bitstream + padding
+ *          is sufficient too.
+ */
 static inline void skip_bits_long(GetBitContext *s, int n)
 {
 #if UNCHECKED_BITSTREAM_READER
-- 
2.16.2



More information about the ffmpeg-devel mailing list