[FFmpeg-devel] [PATCH 03/60] fftools/opt_common: use av_err2str instead of strerror

Marvin Scholz epirat07 at gmail.com
Sun Sep 8 20:46:13 EEST 2024


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);
-- 
2.39.3 (Apple Git-146)




More information about the ffmpeg-devel mailing list