Re: [FFmpeg-devel] [PATCH] lavu/random_seed: use getrandom() when available

2023-07-10 Thread James Almer
On 7/9/2023 7:06 AM, Anton Khirnov wrote: It is a better interface for /dev/u?random on Linux, which avoids the issues associated with opening files. --- configure | 2 ++ libavutil/random_seed.c | 16 2 files changed, 18 insertions(+) diff --git a/configur

Re: [FFmpeg-devel] [PATCH] lavu/random_seed: use getrandom() when available

2023-07-09 Thread Marton Balint
On Sun, 9 Jul 2023, James Almer wrote: On 7/9/2023 1:23 PM, Marton Balint wrote: On Sun, 9 Jul 2023, Anton Khirnov wrote: Quoting Marton Balint (2023-07-07 22:02:26) On Fri, 7 Jul 2023, Anton Khirnov wrote: It is a better interface for /dev/u?random on Linux, which avoids the i

Re: [FFmpeg-devel] [PATCH] lavu/random_seed: use getrandom() when available

2023-07-09 Thread James Almer
On 7/9/2023 1:23 PM, Marton Balint wrote: On Sun, 9 Jul 2023, Anton Khirnov wrote: Quoting Marton Balint (2023-07-07 22:02:26) On Fri, 7 Jul 2023, Anton Khirnov wrote: It is a better interface for /dev/u?random on Linux, which avoids the issues associated with opening files. getrandom

Re: [FFmpeg-devel] [PATCH] lavu/random_seed: use getrandom() when available

2023-07-09 Thread Marton Balint
On Sun, 9 Jul 2023, Anton Khirnov wrote: Quoting Marton Balint (2023-07-07 22:02:26) On Fri, 7 Jul 2023, Anton Khirnov wrote: It is a better interface for /dev/u?random on Linux, which avoids the issues associated with opening files. getrandom() actually have the same problem as read(

Re: [FFmpeg-devel] [PATCH] lavu/random_seed: use getrandom() when available

2023-07-09 Thread Anton Khirnov
Quoting Marton Balint (2023-07-07 22:02:26) > > > On Fri, 7 Jul 2023, Anton Khirnov wrote: > > > It is a better interface for /dev/u?random on Linux, which avoids the > > issues associated with opening files. > > > getrandom() actually have the same problem as read(). It can read less > than

Re: [FFmpeg-devel] [PATCH] lavu/random_seed: use getrandom() when available

2023-07-07 Thread Marton Balint
On Fri, 7 Jul 2023, Anton Khirnov wrote: It is a better interface for /dev/u?random on Linux, which avoids the issues associated with opening files. getrandom() actually have the same problem as read(). It can read less than requested. So you should use it in a loop in that case or if it

Re: [FFmpeg-devel] [PATCH] lavu/random_seed: use getrandom() when available

2023-07-07 Thread James Almer
On 7/7/2023 7:21 AM, Anton Khirnov wrote: It is a better interface for /dev/u?random on Linux, which avoids the issues associated with opening files. --- configure | 2 ++ libavutil/random_seed.c | 15 +++ 2 files changed, 17 insertions(+) diff --git a/configure b/