[FFmpeg-devel] [PATCH] avutil/tests: Improved code coverage for random_seed

Michael Niedermayer michael at niedermayer.cc
Wed Dec 28 21:57:37 EET 2016


On Wed, Dec 28, 2016 at 08:05:17PM +0100, Hendrik Leppkes wrote:
> On Wed, Dec 28, 2016 at 7:57 PM, Michael Niedermayer
[...]
> >
> > get_generic_seed() should work on any platform, ideally.
> > why does it fail on windows ?
> > can you take a look, its probably not very hard to improve it, the
> > function is also quite short.
> >
> 
> I do not have the time right now to debug random sporadic failures,
> since I'm going out of country in a few days for a couple weeks.
> The MSDN documents the clock function as follows:
> 
> The clock function tells how much wall-clock time the calling process
> has used. Note that this is not strictly conformant with ISO C99,
> which specifies net CPU time as the return value. To obtain CPU time,
> use the Win32 GetProcessTimes function.
> 

> So if the function is super fast, its certainly possible the values
> just don't increment, since its wall-clock based. But its generally
> not a problem, since its just never used.

the code should not accept "non incrementing clocks" but wait for a
few increments to have happened, it possibly waits for too few to
gather enough entropy, possibly theres also something else wrong

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161228/84e34868/attachment.sig>


More information about the ffmpeg-devel mailing list