tgq: use bytestream2_get_bytes_left()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Paul B Mahol 2012-03-21 00:10:22 +00:00 committed by Michael Niedermayer
parent 0acacd23d4
commit 1a7a707f74
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ static void tgq_decode_mb(TgqContext *s, int mb_y, int mb_x){
mode = bytestream2_get_byte(&s->gb);
if (mode>12) {
GetBitContext gb;
init_get_bits(&gb, s->gb.buffer, FFMIN(s->gb.buffer_end - s->gb.buffer, mode) * 8);
init_get_bits(&gb, s->gb.buffer, FFMIN(bytestream2_get_bytes_left(&s->gb), mode) * 8);
for(i=0; i<6; i++)
tgq_decode_block(s, s->block[i], &gb);
tgq_idct_put_mb(s, s->block, mb_x, mb_y);