Commit 2540d884 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/random_seed: Add the runtime in cycles of the main loop to the entropy pool

This should theoretically improve the randomness slightly
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 73d1398f
......@@ -97,8 +97,13 @@ static uint32_t get_generic_seed(void)
last_t = t;
}
if(TEST)
if(TEST) {
buffer[0] = buffer[1] = 0;
} else {
#ifdef AV_READ_TIME
buffer[111] += AV_READ_TIME();
#endif
}
av_sha_init(sha, 160);
av_sha_update(sha, (const uint8_t *)buffer, sizeof(buffer));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment