[FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg: fix 2pass log file names
Anton Khirnov
anton at khirnov.net
Fri May 20 12:36:52 EEST 2022
Use the global stream index rather than an unrelated variable in the
filename.
Broken in 6d5d9246042.
---
fftools/ffmpeg_opt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 47e8b9b7bd..c719bc2d0a 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1867,7 +1867,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
snprintf(logfilename, sizeof(logfilename), "%s-%d.log",
ost->logfile_prefix ? ost->logfile_prefix :
DEFAULT_PASS_LOGFILENAME_PREFIX,
- i);
+ nb_output_streams - 1);
if (!strcmp(ost->enc->name, "libx264")) {
av_dict_set(&ost->encoder_opts, "stats", logfilename, AV_DICT_DONT_OVERWRITE);
} else {
--
2.34.1
More information about the ffmpeg-devel
mailing list