]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/get_bits.h
libavcodec/zmbv: change 24-bit decoder channel order, from RGB24 to BGR24
[ffmpeg] / libavcodec / get_bits.h
index 26a5b3e54ff8550b0bf582d013c108c1ea0142c0..c2f267186e3e8641388706d86b9b8c1369c608a2 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);
@@ -403,6 +403,7 @@ static inline unsigned int get_bits(GetBitContext *s, int n)
     LAST_SKIP_BITS(re, s, n);
     CLOSE_READER(re, s);
 #endif
+    av_assert2(tmp < UINT64_C(1) << n);
     return tmp;
 }
 
@@ -442,7 +443,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);