[FFmpeg-devel] [PATCH 03/60] fftools/opt_common: use av_err2str instead of strerror
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Mon Sep 9 04:30:13 EEST 2024
Marvin Scholz:
> The strerror function must not be used here, as the error is a AVERROR
> errno, which depending on the platform no longer corresponds to the
> actual errno that can be handled by strerror.
> ---
> fftools/opt_common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fftools/opt_common.c b/fftools/opt_common.c
> index 059f7a53d2..dc5fc7b96d 100644
> --- a/fftools/opt_common.c
> +++ b/fftools/opt_common.c
> @@ -1207,7 +1207,7 @@ int init_report(const char *env, FILE **file)
> if (!report_file) {
> int err = AVERROR(errno);
> av_log(NULL, AV_LOG_ERROR, "Failed to open report \"%s\": %s\n",
> - filename.str, strerror(errno));
> + filename.str, av_err2str(errno));
> return err;
> }
> av_log_set_callback(log_callback_report);
The code uses strerror(errno) and not strerror(err), so I don't get the
rationale for this commit.
- Andreas
More information about the ffmpeg-devel
mailing list