# HG changeset patch # User mru # Date 1266794904 0 # Node ID 74f7086f532a863b17e3eee350f117163a8b7b86 # Parent af94d2ee8831a9ab82a6e95856a8ab504df404b8 get/show_bits() can read up to MIN_CACHE_BITS bits The limit for get/show_bits_long() to use get/show_bits() directly should be MIN_CACHE_BITS, not 17. diff -r af94d2ee8831 -r 74f7086f532a get_bits.h --- a/get_bits.h Sun Feb 21 23:22:51 2010 +0000 +++ b/get_bits.h Sun Feb 21 23:28:24 2010 +0000 @@ -422,7 +422,7 @@ * reads 0-32 bits. */ static inline unsigned int get_bits_long(GetBitContext *s, int n){ - if(n<=17) return get_bits(s, n); + if(n<=MIN_CACHE_BITS) return get_bits(s, n); else{ #ifdef ALT_BITSTREAM_READER_LE int ret= get_bits(s, 16); @@ -445,7 +445,7 @@ * shows 0-32 bits. */ static inline unsigned int show_bits_long(GetBitContext *s, int n){ - if(n<=17) return show_bits(s, n); + if(n<=MIN_CACHE_BITS) return show_bits(s, n); else{ GetBitContext gb= *s; return get_bits_long(&gb, n);