summaryrefslogtreecommitdiff
path: root/libavcodec/lagarithrac.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/lagarithrac.h')
-rw-r--r--libavcodec/lagarithrac.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/lagarithrac.h b/libavcodec/lagarithrac.h
index aa36d38f85..e4f066e445 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;