diff elbg.c @ 9160:678152bdb3a1 libavcodec

Fix bug when elbg->utility_inc[elbg->numCB-1] == 1
author vitor
date Tue, 10 Mar 2009 17:38:16 +0000
parents aa459306ee59
children a4842fc20ac8
line wrap: on
line diff
--- a/elbg.c	Tue Mar 10 14:35:55 2009 +0000
+++ b/elbg.c	Tue Mar 10 17:38:16 2009 +0000
@@ -105,7 +105,7 @@
 {
     int i=0;
     /* Using linear search, do binary if it ever turns to be speed critical */
-    int r = av_lfg_get(elbg->rand_state)%(elbg->utility_inc[elbg->numCB-1]-1) + 1;
+    int r = av_lfg_get(elbg->rand_state)%elbg->utility_inc[elbg->numCB-1] + 1;
     while (elbg->utility_inc[i] < r)
         i++;