From patchwork Wed Dec 23 04:58:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyan Doshi X-Patchwork-Id: 24629 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 31F0B4480F8 for ; Wed, 23 Dec 2020 06:58:46 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E97E968AA6E; Wed, 23 Dec 2020 06:58:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EBE5968AA15 for ; Wed, 23 Dec 2020 06:58:39 +0200 (EET) Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4D11FB51LMzQlYL for ; Wed, 23 Dec 2020 05:58:38 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id 8Sk3Gbo2wX_R for ; Wed, 23 Dec 2020 05:58:35 +0100 (CET) From: Gyan Doshi To: ffmpeg-devel@ffmpeg.org Date: Wed, 23 Dec 2020 10:28:09 +0530 Message-Id: <20201223045809.709-1-ffmpeg@gyani.pro> In-Reply-To: <20201222231920.GO2396667@pb2> References: <20201222231920.GO2396667@pb2> MIME-Version: 1.0 X-MBO-SPAM-Probability: * X-Rspamd-Score: 0.10 / 15.00 / 15.00 X-Rspamd-Queue-Id: BDBFD170D X-Rspamd-UID: 725d35 Subject: [FFmpeg-devel] [PATCH] ffmpeg: add 100ms delay for first stats X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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; }