[FFmpeg-devel] [PATCH 1/2] avutil/random_seed: add av_random()

Anton Khirnov anton at khirnov.net
Tue Jul 4 22:59:31 EEST 2023


> 
> Not if any of the functions above were called but failed to fill the buffer.
> 
> I could add return AVERROR(ENOSYS) to the HAVE_UNISTD_H block, and 
> return AVERROR_INVALIDDATA outside.

AVERROR_INVALIDDATA is defined as 'Invalid data found when processing
input'.
This function does not process any input, so IMO that code never makes
sense for it.

I'd say make it ENOSYS, AVERROR_UNKNOWN, or keep around one of
individual method errors.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list