diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-09-09 14:06:57 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-09-09 14:06:57 +0200 |
commit | 4b1b47e81b5c031953ed2d466fc659d5e13082b7 (patch) | |
tree | 00577f48d2fbb355d416ed2a618d921cab6dd60a /libavcodec/scpr.c | |
parent | 5161f7bcfd3c2d2e6cb92e782855b7fc00bdf877 (diff) | |
download | ffmpeg-4b1b47e81b5c031953ed2d466fc659d5e13082b7.tar.gz |
avcodec/scpr: stop checking for overread twice
Diffstat (limited to 'libavcodec/scpr.c')
-rw-r--r-- | libavcodec/scpr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c index f1584355c0..81597aa4dc 100644 --- a/libavcodec/scpr.c +++ b/libavcodec/scpr.c @@ -136,7 +136,7 @@ static int decode(GetByteContext *gb, RangeCoder *rc, unsigned cumFreq, unsigned rc->range *= freq; while (rc->range < TOP && bytestream2_get_bytes_left(gb) > 0) { - unsigned byte = bytestream2_get_byte(gb); + unsigned byte = bytestream2_get_byteu(gb); rc->code = (rc->code << 8) | byte; rc->range <<= 8; } @@ -172,7 +172,7 @@ static int decode0(GetByteContext *gb, RangeCoder *rc, unsigned cumFreq, unsigne rc->range = rc->range * (uint64_t)(freq + cumFreq) / total_freq - (t + 1); while (rc->range < TOP && bytestream2_get_bytes_left(gb) > 0) { - unsigned byte = bytestream2_get_byte(gb); + unsigned byte = bytestream2_get_byteu(gb); rc->code = (rc->code << 8) | byte; rc->code1 <<= 8; rc->range <<= 8; |