]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/get_bits: use unsigned integers in show_bits and get_bits
authorMarton Balint <cus@passwd.hu>
Sat, 16 Feb 2019 23:48:13 +0000 (00:48 +0100)
committerMarton Balint <cus@passwd.hu>
Fri, 1 Mar 2019 21:33:55 +0000 (22:33 +0100)
The return value is also unsigned.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavcodec/get_bits.h

index 26a5b3e54ff8550b0bf582d013c108c1ea0142c0..2e2adc29c26dc077c269a17485f5ec275e1c9a2b 100644 (file)
@@ -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);