aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/elbg.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2009-03-10 17:38:16 +0000
committerVitor Sessak <vitor1001@gmail.com>2009-03-10 17:38:16 +0000
commite40ee25c4943af8d3fbf0bf47109473d5a2ba8d1 (patch)
treebdbcef4d8d53249e440439743aa1604471ed78c6 /libavcodec/elbg.c
parenteb2c24232f19160cc91392b78d2482faa0006bcf (diff)
downloadffmpeg-e40ee25c4943af8d3fbf0bf47109473d5a2ba8d1.tar.gz
Fix bug when elbg->utility_inc[elbg->numCB-1] == 1
Originally committed as revision 17926 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/elbg.c')
-rw-r--r--libavcodec/elbg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/elbg.c b/libavcodec/elbg.c
index 35f068825f..85319db78e 100644
--- a/libavcodec/elbg.c
+++ b/libavcodec/elbg.c
@@ -105,7 +105,7 @@ static int get_high_utility_cell(elbg_data *elbg)
{
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++;