avutil/random_seed: turn off buffering when reading from random

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2023-07-09 10:38:21 +02:00
parent 153cf85b24
commit 9a7f060c32
1 changed files with 1 additions and 0 deletions

View File

@ -59,6 +59,7 @@ static int read_random(uint8_t *dst, size_t len, const char *file)
if (!fp)
return AVERROR_UNKNOWN;
setvbuf(fp, NULL, _IONBF, 0);
err = fread(dst, 1, len, fp);
fclose(fp);