On 16/02/13 21:37, Anton Khirnov wrote: > range == 0 happens with corrupted files > > CC:[email protected] > --- > libavcodec/lagarithrac.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/libavcodec/lagarithrac.h b/libavcodec/lagarithrac.h > index aa36d38..e4f066e 100644 > --- a/libavcodec/lagarithrac.h > +++ b/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; >
I guess it is ok. Not sure if checking for 0 outside would let use explode if requested. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
