[FFmpeg-cvslog] lavfi/vf_vmafmotion: use av_err2str to simplify code

Marvin Scholz git at videolan.org
Fri Sep 13 01:36:18 EEST 2024


ffmpeg | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sun Sep  8 20:02:34 2024 +0200| [e93f20c0173d811246943b9078209609734ca3a2] | committer: Marvin Scholz

lavfi/vf_vmafmotion: use av_err2str to simplify code

No need to explicitly specify the buffer here as it is only
ever passed to av_log, so av_err2str can be used.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e93f20c0173d811246943b9078209609734ca3a2
---

 libavfilter/vf_vmafmotion.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c
index 7bc73416e8..f9315e56b6 100644
--- a/libavfilter/vf_vmafmotion.c
+++ b/libavfilter/vf_vmafmotion.c
@@ -318,10 +318,8 @@ static av_cold int init(AVFilterContext *ctx)
             s->stats_file = avpriv_fopen_utf8(s->stats_file_str, "w");
             if (!s->stats_file) {
                 int err = AVERROR(errno);
-                char buf[128];
-                av_strerror(err, buf, sizeof(buf));
                 av_log(ctx, AV_LOG_ERROR, "Could not open stats file %s: %s\n",
-                       s->stats_file_str, buf);
+                       s->stats_file_str, av_err2str(err));
                 return err;
             }
         }



More information about the ffmpeg-cvslog mailing list