lagarith: avoid infinite loop in lag_rac_refill()

range == 0 happens with corrupted files

CC:libav-stable@libav.org
pull/10/head
Anton Khirnov 12 years ago
parent f935aca44c
commit de6dfa2bb8
  1. 3
      libavcodec/lagarithrac.h

@ -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…
Cancel
Save