]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/get_bits.h
Merge commit '8b8899ac3233b4f7af83ded0dc032fad8902d714'
[ffmpeg] / libavcodec / get_bits.h
index 05ac8f7ef98aa16b45fad656e588176d015d6656..a1a48ab87d066d769bf17bfe55134e8f424e737e 100644 (file)
@@ -302,7 +302,9 @@ static inline void skip_bits1(GetBitContext *s)
  */
 static inline unsigned int get_bits_long(GetBitContext *s, int n)
 {
-    if (n <= MIN_CACHE_BITS)
+    if (!n) {
+        return 0;
+    } else if (n <= MIN_CACHE_BITS)
         return get_bits(s, n);
     else {
 #ifdef BITSTREAM_READER_LE