Commit a848ef59 authored by mru's avatar mru

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.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21951 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2ff983f1
...@@ -422,7 +422,7 @@ static inline void skip_bits1(GetBitContext *s){ ...@@ -422,7 +422,7 @@ static inline void skip_bits1(GetBitContext *s){
* reads 0-32 bits. * reads 0-32 bits.
*/ */
static inline unsigned int get_bits_long(GetBitContext *s, int n){ 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{ else{
#ifdef ALT_BITSTREAM_READER_LE #ifdef ALT_BITSTREAM_READER_LE
int ret= get_bits(s, 16); int ret= get_bits(s, 16);
...@@ -445,7 +445,7 @@ static inline int get_sbits_long(GetBitContext *s, int n) { ...@@ -445,7 +445,7 @@ static inline int get_sbits_long(GetBitContext *s, int n) {
* shows 0-32 bits. * shows 0-32 bits.
*/ */
static inline unsigned int show_bits_long(GetBitContext *s, int n){ 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{ else{
GetBitContext gb= *s; GetBitContext gb= *s;
return get_bits_long(&gb, n); return get_bits_long(&gb, n);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment