lavfi/vf_psnr: 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.
This commit is contained in:
Marvin Scholz 2024-09-08 20:01:15 +02:00
parent 4c6d07dd28
commit 29d7ed089e
1 changed files with 1 additions and 3 deletions

View File

@ -290,10 +290,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;
}
}