[FFmpeg-devel] [PATCH v3 3/3] avutil/random_seed: add support for gcrypt and OpenSSL as source of randomness
James Almer
jamrial at gmail.com
Thu Jul 6 21:36:27 EEST 2023
On 7/6/2023 2:56 PM, Marton Balint wrote:
>
>
> On Thu, 6 Jul 2023, James Almer wrote:
>
>> On 7/6/2023 4:52 AM, Anton Khirnov wrote:
>>> Quoting James Almer (2023-07-05 15:03:07)
>>>> On 7/5/2023 9:56 AM, Anton Khirnov wrote:
>>>>> Quoting James Almer (2023-07-05 01:26:14)
>>>>>> Signed-off-by: James Almer <jamrial at gmail.com>
>>>>>> ---
>>>>>> configure | 2 +-
>>>>>> libavutil/random_seed.c | 16 ++++++++++++++++
>>>>>> 2 files changed, 17 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/configure b/configure
>>>>>> index 107d533b3e..d6e78297fe 100755
>>>>>> --- a/configure
>>>>>> +++ b/configure
>>>>>> @@ -3892,7 +3892,7 @@ avfilter_deps="avutil"
>>>>>> avfilter_suggest="libm stdatomic"
>>>>>> avformat_deps="avcodec avutil"
>>>>>> avformat_suggest="libm network zlib stdatomic"
>>>>>> -avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl
>>>>>> user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia
>>>>>> bcrypt stdatomic"
>>>>>> +avutil_suggest="clock_gettime ffnvcodec gcrypt libm libdrm libmfx
>>>>>> opencl openssl user32 vaapi vulkan videotoolbox corefoundation
>>>>>> corevideo coremedia bcrypt stdatomic"
>>>>>
>>>>> What will this do exactly?
>>>>
>>>> It's a soft dependency. Only if OpenSSL or GCrypt are enabled they
>>>> will
>>>> be added to avutil's library dependencies.
>>>> Notice the bcrypt entry, also used in random_seed, and all the
>>>> hwcontext
>>>> backends.
>>>
>>> Ok then.
>>
>> Any opinion on the order of function calls? Should i leave
>> /dev/urandom as last resort after all (if any) external lib
>> implementations failed, considering what Remí mentioned?
>
> I think it is fine as is. Buffering can be turned off with
> setvbuf(f, NULL, _IONBF, 0); so that should not relevant.
Ok, applied as is, then.
More information about the ffmpeg-devel
mailing list