Browse Source

libmpeg2 style bitstream reader 17 vs 16 bit bugfix

Originally committed as revision 1881 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 22 years ago
parent
commit
3bb10888ff
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      libavcodec/common.c
  2. +2
    -2
      libavcodec/common.h

+ 1
- 1
libavcodec/common.c View File

@@ -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


+ 2
- 2
libavcodec/common.h View File

@@ -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;\


Loading…
Cancel
Save