From patchwork Wed Sep 28 09:55:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 38420 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp93947pzh; Wed, 28 Sep 2022 02:59:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5FqihkteG6VxB7FvbmEb49/sp2icZuBZXEzhap8+4MlCWhcKAW2ZeyTI53YVdAiA/Mq0vJ X-Received: by 2002:a05:6402:35d6:b0:44e:f45a:8f79 with SMTP id z22-20020a05640235d600b0044ef45a8f79mr32506210edc.393.1664359146606; Wed, 28 Sep 2022 02:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664359146; cv=none; d=google.com; s=arc-20160816; b=VfNsAoWvGw+qgkpVrWK9zcHHESZrC9tGdkGsf7cJ4FU/xxp7TUR67rYH3EzYT2XNGd /7jKCA8PxUR7K7uzBzis7L/iYnjv7sR8SaBt+FT0TSRPDX1sqobt/MztIL5FuSUfbwxh OT1ejP0zZ9QparSVnu7JGrHGGZ01p9Dq88uXKheTuAHCZiqMEKdyQqs1UBjqbKKIn6or TqE8bZ5OK4rzoEiIyGOFQTzl0/ZMxfPEW23dhJ3Z47BBwADXiFI8JQEN95PMWL76Nf5T wFZVrF1MiJfiloWJ4RiaTFjIkiS36+6YnWfovXTWdiUetdWMqw3yhXGsNOf02CrVdtYs E9NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=3vFY5ZyUJFj1orh7IthA4YTibjE+dxUtU2FKinRrURQ=; b=eEHK1RZSKQ/Z1dY27R7erQPyMpwRdj+OkCVcVgOWNkRArdvpXK3gkgrgGHlxscDyn9 lcVylgnmB1gV+jSGTyYbFDj+px+k6HBbmbwxL44MjIxlci1TPHoXuo1uMyXa2d4EfPzl JJxGFT3fBCoUPdp5DoX3C1stZWUBoQNXTd5Tie+b/T1M38Yb50PhEqKoDM9fMtiScKCP ioUFxAmOe28U77Foiw5AXKeHmYwoxoMoH7owusl8FdX55wyzWGj0rwR67ZrDn93X7dXy fJtmGtl002Oze2ABxgTN2BEPm+CKKPi1yYTH6fVocs0/Cxh13vv/+tVh97ooqvJie5UL GlUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id bo5-20020a0564020b2500b00457d66f2813si2715125edb.596.2022.09.28.02.59.06; Wed, 28 Sep 2022 02:59:06 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3718E68BC00; Wed, 28 Sep 2022 12:58:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 76A6E68BBBB for ; Wed, 28 Sep 2022 12:58:07 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 9E86C2404F5 for ; Wed, 28 Sep 2022 11:58:03 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id ZbXvaVWM63CM for ; Wed, 28 Sep 2022 11:58:03 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 2B83E240591 for ; Wed, 28 Sep 2022 11:58:01 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 44E353A13BB for ; Wed, 28 Sep 2022 11:58:01 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 28 Sep 2022 11:55:52 +0200 Message-Id: <20220928095556.28209-5-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220928095556.28209-1-anton@khirnov.net> References: <20220928095556.28209-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/9] fftools/ffmpeg: drop never-set OutputStream.first_pts X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: vKj91gMgXJEP --- fftools/ffmpeg.c | 2 +- fftools/ffmpeg.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 697971167c..971c146fea 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -763,7 +763,7 @@ static int check_recording_time(OutputStream *ost) OutputFile *of = output_files[ost->file_index]; if (of->recording_time != INT64_MAX && - av_compare_ts(ost->sync_opts - ost->first_pts, ost->enc_ctx->time_base, of->recording_time, + av_compare_ts(ost->sync_opts, ost->enc_ctx->time_base, of->recording_time, AV_TIME_BASE_Q) >= 0) { close_output_stream(ost); return 0; diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 8acc83e92a..a9883c0442 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -495,9 +495,6 @@ typedef struct OutputStream { /* input pts and corresponding output pts for A/V sync */ int64_t sync_opts; /* output frame counter, could be changed to some true timestamp */ // FIXME look at frame_number - /* pts of the first frame encoded for this stream, used for limiting - * recording time */ - int64_t first_pts; /* dts of the last packet sent to the muxing queue, in AV_TIME_BASE_Q */ int64_t last_mux_dts; /* pts of the last frame received from the filters, in AV_TIME_BASE_Q */