diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-06 19:58:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-06 19:58:30 +0200 |
commit | 28943c4d31a56ec6fe1ddb019d312412de7b630b (patch) | |
tree | c2e5c680da38abe29a001e8561b844c4035a7c13 /libavfilter/vf_noise.c | |
parent | 62447248f3e5eb95dbd9f123696321903d4d0921 (diff) | |
download | ffmpeg-28943c4d31a56ec6fe1ddb019d312412de7b630b.tar.gz |
vf_noise: Fix av_lfg_get() maximum value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_noise.c')
-rw-r--r-- | libavfilter/vf_noise.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c index be39cb21a7..e9a4aa3a29 100644 --- a/libavfilter/vf_noise.c +++ b/libavfilter/vf_noise.c @@ -126,8 +126,8 @@ static int init_noise(NoiseContext *n, int comp) } else { double x1, x2, w, y1; do { - x1 = 2.0 * av_lfg_get(lfg) / (float)RAND_MAX - 1.0; - x2 = 2.0 * av_lfg_get(lfg) / (float)RAND_MAX - 1.0; + x1 = 2.0 * av_lfg_get(lfg) / (float)UINT_MAX - 1.0; + x2 = 2.0 * av_lfg_get(lfg) / (float)UINT_MAX - 1.0; w = x1 * x1 + x2 * x2; } while (w >= 1.0); |