]> git.sesse.net Git - ffmpeg/commit
lavu/random_seed: use arc4random() when available
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Mon, 7 Dec 2015 02:10:21 +0000 (21:10 -0500)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Thu, 17 Dec 2015 16:12:41 +0000 (08:12 -0800)
commit39f8c7961dcd530e88d13c600145097106647d2e
tree0519a50d0ca6c71a57b98525a3b8ef0bd74bf244
parent7b880464cb31b779259d56123e03cf3903d476e5
lavu/random_seed: use arc4random() when available

arc4random() was designed as a superior interface for system random
number generation, designed for OpenBSD and subsequently incorporated by
other BSD's, Mac OS X, and some non-standard libc's. It is thus an improvement to
use it whenever available.

As a side note, this may or may not get included in glibc, and there is
a proposal to create a posix_random family based on these ideas:
http://austingroupbugs.net/view.php?id=859.

Tested on Mac OS X.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
configure
libavutil/random_seed.c