[FFmpeg-devel] [PATCH 2/3] avcodec/get_bits: use unsigned integers in show_bits and get_bits

Marton Balint cus at passwd.hu
Sun Feb 17 21:44:52 EET 2019


The return value is also unsigned.
---
 libavcodec/get_bits.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index 26a5b3e54f..2e2adc29c2 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -380,7 +380,7 @@ static inline int get_sbits(GetBitContext *s, int n)
  */
 static inline unsigned int get_bits(GetBitContext *s, int n)
 {
-    register int tmp;
+    register unsigned int tmp;
 #if CACHED_BITSTREAM_READER
 
     av_assert2(n>0 && n<=32);
@@ -442,7 +442,7 @@ static inline unsigned int get_bits_le(GetBitContext *s, int n)
  */
 static inline unsigned int show_bits(GetBitContext *s, int n)
 {
-    register int tmp;
+    register unsigned int tmp;
 #if CACHED_BITSTREAM_READER
     if (n > s->bits_left)
         refill_32(s);
-- 
2.16.4



More information about the ffmpeg-devel mailing list