random_seed: allow to block on /dev/random
authorMåns Rullgård <mans@mansr.com>
Thu, 1 Jul 2010 11:40:50 +0000 (11:40 +0000)
committerMåns Rullgård <mans@mansr.com>
Thu, 1 Jul 2010 11:40:50 +0000 (11:40 +0000)
commitb7fa5c5abb39f819fbb42253711bc13e5cac0e81
tree65ad4cab2ec87f5aae8607efc6a112177c156060
parenta158446b2842143a1ea0a284952571435c9ad3c4
random_seed: allow to block on /dev/random

If both /dev/random and /dev/urandom failed to return data, an
uninitialised value might be returned.  Since most systems have a
non-blocking /dev/urandom or have /dev/random with similar properties,
the chance of blocking is minimal, and the alternative of returning
non-random data is worse.

Originally committed as revision 23930 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavutil/random_seed.c