diff options
author | Janne Grunau <janne-libav@jannau.net> | 2012-01-09 02:06:59 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2012-01-10 16:58:53 +0100 |
commit | e652cc9606068189cb512a36f0335a5cf2ecf287 (patch) | |
tree | 895212a61b90b0451bfc74b86af2f30b56eba9b0 /libavcodec/rv34.c | |
parent | ac646076826bf5ec36356fdda2826a5663eec303 (diff) | |
download | ffmpeg-e652cc9606068189cb512a36f0335a5cf2ecf287.tar.gz |
rv34: use get_bits_left()
It is not necessary to store the bit stream length in a RV34DecContext
field.
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r-- | libavcodec/rv34.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 91d678876a..f9f8677385 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1186,7 +1186,7 @@ static int check_slice_end(RV34DecContext *r, MpegEncContext *s) return 1; if(r->s.mb_skip_run > 1) return 0; - bits = r->bits - get_bits_count(&s->gb); + bits = get_bits_left(&s->gb); if(bits < 0 || (bits < 8 && !show_bits(&s->gb, bits))) return 1; return 0; @@ -1266,7 +1266,6 @@ static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int r->si.end = end; s->qscale = r->si.quant; - r->bits = buf_size*8; s->mb_num_left = r->si.end - r->si.start; r->s.mb_skip_run = 0; |