changeset 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 7a9a124bbc06
children 3a54ad453dbf
files elbg.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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++;