1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-16 12:17:12 +00:00

misc/random: seed using libavutil/random_seed

When starting multiple processes of `mpv --shuffle` in parallel,
sometimes the random seed happens to be identical, so files are
played in the same random order.

mp_rand_seed(0) now uses a random seed provided by libavutil,
and only falls back to time in case of failure.
This commit is contained in:
Andreas Klauer 2024-09-27 19:35:37 +02:00 committed by sfan5
parent 53f2619dbd
commit c365e2f7b1
4 changed files with 16 additions and 3 deletions