Mercurial > libavcodec.hg
diff common.h @ 1263:9fce515e9894 libavcodec
libmpeg2 style bitstream reader 17 vs 16 bit bugfix
author | michaelni |
---|---|
date | Wed, 14 May 2003 22:38:58 +0000 |
parents | 362947395f5c |
children | a979fab41ed8 |
line wrap: on
line diff
--- a/common.h Wed May 14 17:46:55 2003 +0000 +++ b/common.h Wed May 14 22:38:58 2003 +0000 @@ -546,7 +546,7 @@ #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 @@ #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;\