mirror of https://git.ffmpeg.org/ffmpeg.git
lagarith: avoid infinite loop in lag_rac_refill()
range == 0 happens with corrupted files CC:libav-stable@libav.org
This commit is contained in:
parent
f935aca44c
commit
de6dfa2bb8
|
@ -107,6 +107,9 @@ static inline uint8_t lag_get_rac(lag_rac *l)
|
|||
l->range -= range_scaled * l->prob[255];
|
||||
}
|
||||
|
||||
if (!l->range)
|
||||
l->range = 0x80;
|
||||
|
||||
l->low -= range_scaled * l->prob[val];
|
||||
|
||||
return val;
|
||||
|
|
Loading…
Reference in New Issue