[FFmpeg-devel] [PATCH] get rid of rand() usage in libavformat/timefilter.c
Fri Apr 10 16:36:11 CEST 2009
On Fri, Apr 10, 2009 at 02:50:16PM +0200, Diego Biurrun wrote:
> On Sun, Mar 29, 2009 at 07:17:43PM +0200, Michael Niedermayer wrote:
> > On Sun, Mar 29, 2009 at 05:37:24PM +0200, Diego Biurrun wrote:
> > > Here is a patch to use av_lfg* in libavformat/timefilter.c instead of
> > > rand().
> > RAND_MAX + av_lfg() is not good
> What is the alternative?
RAND_MAX is the maximum value that rand() returns.
The "alternative" is replacing RAND_MAX by the correct constant for
av_lfg, which is (1ULL << 32) - 1
More information about the ffmpeg-devel