tta: check remaining bitstream size while reading unary value

This commit is contained in:
Justin Ruggles 2011-09-21 14:16:24 -04:00
parent 3d813e4c54
commit 35f9d8c20a
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ static int tta_get_unary(GetBitContext *gb)
int ret = 0;
// count ones
while(get_bits1(gb))
while (get_bits_left(gb) > 0 && get_bits1(gb))
ret++;
return ret;
}