No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used.
Unified · Split
| @@ -1320,12 +1320,9 @@ static av_cold int init(AVFilterContext *ctx) · 1319 unmodified lines | ||
| 1320 | 1320 | } else { |
| 1321 | 1321 | s->stats_file = avpriv_fopen_utf8(s->stats_file_str, "w"); |
| 1322 | 1322 | if (!s->stats_file) { |
| 1323 | − char buf[128]; | |
| 1324 | − | |
| 1325 | 1323 | err = AVERROR(errno); |
| 1326 | − av_strerror(err, buf, sizeof(buf)); | |
| 1327 | 1324 | av_log(ctx, AV_LOG_ERROR, "Could not open stats file %s: %s\n", |
| 1328 | − s->stats_file_str, buf); | |
| 1325 | + s->stats_file_str, av_err2str(err)); | |
| 1329 | 1326 | return err; |
| 1330 | 1327 | } |
| 1331 | 1328 | } |