summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fftools/ffmpeg_opt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index a5cd989d35..2c1b3bd0dd 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1868,7 +1868,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 {