diff options
Diffstat (limited to 'libavcodec/lagarithrac.c')
-rw-r--r-- | libavcodec/lagarithrac.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/lagarithrac.c b/libavcodec/lagarithrac.c index b3ad941..9f7bc41 100644 --- a/libavcodec/lagarithrac.c +++ b/libavcodec/lagarithrac.c @@ -32,15 +32,17 @@ void ff_lag_rac_init(lag_rac *l, GetBitContext *gb, int length) { - int i, j; + int i, j, left; /* According to reference decoder "1st byte is garbage", * however, it gets skipped by the call to align_get_bits() */ align_get_bits(gb); + left = get_bits_left(gb) >> 3; l->bytestream_start = l->bytestream = gb->buffer + get_bits_count(gb) / 8; - l->bytestream_end = l->bytestream_start + get_bits_left(gb) / 8; + l->bytestream_end = l->bytestream_start + left; + l->range = 0x80; l->low = *l->bytestream >> 1; l->hash_shift = FFMAX(l->scale - 8, 0); |