Wait for all output files to be initialized before printing first stats.
Avoids breaking output file dump report.
static unsigned dup_warning = 1000;
static int nb_frames_drop = 0;
static int64_t decode_error_stat[2];
+static unsigned nb_output_dumped = 0;
static int want_sdp = 1;
if (last_time == -1) {
last_time = cur_time;
}
- if ((cur_time - last_time) < stats_period && !first_report)
+ if (((cur_time - last_time) < stats_period && !first_report) ||
+ (first_report && nb_output_dumped < nb_output_files))
return;
last_time = cur_time;
}
of->header_written = 1;
av_dump_format(of->ctx, file_index, of->ctx->url, 1);
+ nb_output_dumped++;
if (sdp_filename || want_sdp)
print_sdp();