diff --git a/libavcodec/common.c b/libavcodec/common.c
index 26165b9018b847bce8f4ac1862d08bc74d0e50b5..0e6cd69d0bbaf24c23472062669fd1501da6dc59 100644
--- a/libavcodec/common.c
+++ b/libavcodec/common.c
@@ -162,7 +162,7 @@ void init_get_bits(GetBitContext *s,
     {
         OPEN_READER(re, s)
         UPDATE_CACHE(re, s)
-//        UPDATE_CACHE(re, s)
+        UPDATE_CACHE(re, s)
         CLOSE_READER(re, s)
     }
 #ifdef A32_BITSTREAM_READER
diff --git a/libavcodec/common.h b/libavcodec/common.h
index 092026d78eb6fa92f75e419aae2731d45111eff5..874b15cda48554aca70436ee19917c8b3c48dbb0 100644
--- a/libavcodec/common.h
+++ b/libavcodec/common.h
@@ -546,7 +546,7 @@ static inline int get_bits_count(GetBitContext *s){
 #elif defined LIBMPEG2_BITSTREAM_READER
 //libmpeg2 like reader
 
-#   define MIN_CACHE_BITS 16
+#   define MIN_CACHE_BITS 17
 
 #   define OPEN_READER(name, gb)\
         int name##_bit_count=(gb)->bit_count;\
@@ -570,7 +570,7 @@ static inline int get_bits_count(GetBitContext *s){
 #else
 
 #   define UPDATE_CACHE(name, gb)\
-    if(name##_bit_count > 0){\
+    if(name##_bit_count >= 0){\
         name##_cache+= ((name##_buffer_ptr[0]<<8) + name##_buffer_ptr[1]) << name##_bit_count;\
         name##_buffer_ptr+=2;\
         name##_bit_count-= 16;\