mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 16:40:18 +00:00
ug_srand->ug_rand_init (improved seeding)
On POSIX systems, add also clock() to the seed + use as a source also /dev/random if available.
This commit is contained in:
@@ -419,8 +419,7 @@ struct init_data *common_preinit(int argc, char *argv[])
|
||||
open_all("ultragrid_*.so", init.opened_libs); // load modules
|
||||
}
|
||||
|
||||
// init_rng in rtp.c added also hostname to the seed
|
||||
ug_srand((getpid() * 42) ^ get_time_in_ns());
|
||||
ug_rand_init();
|
||||
|
||||
#ifdef __linux__
|
||||
mtrace();
|
||||
|
||||
Reference in New Issue
Block a user