[FFmpeg-devel] [PATCH] ffmpeg: add 100ms delay for first stats

Gyan Doshi ffmpeg at gyani.pro
Wed Dec 23 06:58:09 EET 2020


Avoids breaking output file dump report.
---
 fftools/ffmpeg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 2c0820aacf..449da484d9 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1699,7 +1699,8 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
         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) ||
+            ((cur_time - last_time) < 100000 && first_report))
             return;
         last_time = cur_time;
     }
-- 
2.27.0



More information about the ffmpeg-devel mailing list