[SCM] libav/experimental: Fix bug when elbg->utility_inc[elbg->numCB-1] == 1
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:41:06 UTC 2013
The following commit has been merged in the experimental branch:
commit e40ee25c4943af8d3fbf0bf47109473d5a2ba8d1
Author: Vitor Sessak <vitor1001 at gmail.com>
Date: Tue Mar 10 17:38:16 2009 +0000
Fix bug when elbg->utility_inc[elbg->numCB-1] == 1
Originally committed as revision 17926 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/elbg.c b/libavcodec/elbg.c
index 35f0688..85319db 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++;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list