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

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


ffmpeg | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sun Sep  8 19:50:46 2024 +0200| [c6ab95d009f080a8f0beea5149ae8335186adbe1] | committer: Marvin Scholz

lavfi/vf_ssim360: 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=c6ab95d009f080a8f0beea5149ae8335186adbe1
---

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

diff --git a/libavfilter/vf_ssim360.c b/libavfilter/vf_ssim360.c
index 57da2f3938..68bd7b4d78 100644
--- a/libavfilter/vf_ssim360.c
+++ b/libavfilter/vf_ssim360.c
@@ -1320,12 +1320,9 @@ static av_cold int init(AVFilterContext *ctx)
         } else {
             s->stats_file = avpriv_fopen_utf8(s->stats_file_str, "w");
             if (!s->stats_file) {
-                char buf[128];
-
                 err = AVERROR(errno);
-                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