From patchwork Fri Jan 27 13:16:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 40134 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3ca3:b0:b9:1511:ac2c with SMTP id b35csp1338050pzj; Fri, 27 Jan 2023 05:17:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXuJXxQxTIJDPETRV4kaS3kobfENcnkCu+Q1TBT62w4N9JpQjbmvNDCmGwNycj1PjJC1uDPR X-Received: by 2002:aa7:cad3:0:b0:49e:eb11:e40 with SMTP id l19-20020aa7cad3000000b0049eeb110e40mr27665240edt.34.1674825465735; Fri, 27 Jan 2023 05:17:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674825465; cv=none; d=google.com; s=arc-20160816; b=mRkA6ypmOLU+OJrHwP2Nj2nitauB22SmtoOsnR6wmaseJ+n5c+eVtXCUwqiYlpBNR+ /UchV+ra3O2snBy8UkfPBJlJO4jbbObUnjQ8PBIl7kkKFg3smbE4dN+iWeonnS37ZqlE u7aC5g6avcdPNIsPTUZnc0L7N3KjQTeB0R1ZdyRPXOxGwlRMQUGJny+wbUmtn1doWG/f k8S/Yon9Di0grTGtg2OY4LlfIDpTnzQALUldoGbv1ZpKfLMb2Ps1Uflw/EW8GPw+zjVb mVp34QG3PeeeZmj8kw0eXeHaINFceQAsj7ovDtCy5VfGxENf4HMxB7n7EnVlxqnvQ3Lr qjcw== 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=u1bo+vvS2COysSqBSFfLRMUbx7oMGqaZeOjwkb3I3o8=; b=kSIY8vdhIi5JDMc1/I0RHC4b5ACUWdH16EUTU9rpY/s2PyNTocst77J7YtP1zwG1Oq lz5lc1CCZHggDZGH6DzsLTbMweBVgq+QYm7fuekNxYCak5Oy/WyRF0b+sIX3z5cJFVZO SVtGqxmk4jyWkAIf17qpe2F2K3djtZa9KJ6mkD7L/fU55CxtkSXUWRhcsL16jTQVKtW3 FxcTz/p4ZJDSP6aiMdJ1sDuOFGxzYJT3r6uqFLHdRLQvGGXdkvyRKsTb3JjG0JK1cZFh n8kDJnbuL4QXLdEi66jt+DvreWyGRhJIAOCP/fEQWveDQz0cqJLbJ4ERAMpBXPftv4Yo cUcA== 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 d27-20020a056402401b00b0049e68398021si5962103eda.242.2023.01.27.05.17.45; Fri, 27 Jan 2023 05:17:45 -0800 (PST) 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 7515168BDE1; Fri, 27 Jan 2023 15:17:32 +0200 (EET) 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 5F69468B2C3 for ; Fri, 27 Jan 2023 15:17:24 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 64D1E240591 for ; Fri, 27 Jan 2023 14:17:23 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id r351XF8p2Gmm for ; Fri, 27 Jan 2023 14:17:22 +0100 (CET) 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 C33D1240178 for ; Fri, 27 Jan 2023 14:17:22 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 208E23A034C for ; Fri, 27 Jan 2023 14:17:15 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 27 Jan 2023 14:16:39 +0100 Message-Id: <20230127131639.4928-4-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230127131639.4928-1-anton@khirnov.net> References: <20230127131639.4928-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/4] lavfi/framesync: reindent after previous commit 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: SNjX0AtXqWkO --- libavfilter/framesync.c | 56 ++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/libavfilter/framesync.c b/libavfilter/framesync.c index b52cf318c0..9986b04e48 100644 --- a/libavfilter/framesync.c +++ b/libavfilter/framesync.c @@ -368,35 +368,35 @@ static int framesync_advance(FFFrameSync *fs) } pts = fs->in[0].pts; } else { - pts = INT64_MAX; - for (i = 0; i < fs->nb_in; i++) - if (fs->in[i].have_next && fs->in[i].pts_next < pts) - pts = fs->in[i].pts_next; - if (pts == INT64_MAX) { - framesync_eof(fs); - break; - } - for (i = 0; i < fs->nb_in; i++) { - FFFrameSyncIn * const in = &fs->in[i]; - - if (in->pts_next == pts || - (in->ts_mode == TS_NEAREST && in->have_next && - in->pts_next != INT64_MAX && in->pts != AV_NOPTS_VALUE && - in->pts_next - pts < pts - in->pts) || - (in->before == EXT_INFINITY && in->state == STATE_BOF)) { - frame_advance(in); - in->state = in->frame ? STATE_RUN : STATE_EOF; - if (in->sync == fs->sync_level && in->frame) - fs->frame_ready = 1; - if (in->state == STATE_EOF && in->after == EXT_STOP) - framesync_eof(fs); - } - } - if (fs->frame_ready) + pts = INT64_MAX; for (i = 0; i < fs->nb_in; i++) - if ((fs->in[i].state == STATE_BOF && - fs->in[i].before == EXT_STOP)) - fs->frame_ready = 0; + if (fs->in[i].have_next && fs->in[i].pts_next < pts) + pts = fs->in[i].pts_next; + if (pts == INT64_MAX) { + framesync_eof(fs); + break; + } + for (i = 0; i < fs->nb_in; i++) { + FFFrameSyncIn * const in = &fs->in[i]; + + if (in->pts_next == pts || + (in->ts_mode == TS_NEAREST && in->have_next && + in->pts_next != INT64_MAX && in->pts != AV_NOPTS_VALUE && + in->pts_next - pts < pts - in->pts) || + (in->before == EXT_INFINITY && in->state == STATE_BOF)) { + frame_advance(in); + in->state = in->frame ? STATE_RUN : STATE_EOF; + if (in->sync == fs->sync_level && in->frame) + fs->frame_ready = 1; + if (in->state == STATE_EOF && in->after == EXT_STOP) + framesync_eof(fs); + } + } + if (fs->frame_ready) + for (i = 0; i < fs->nb_in; i++) + if ((fs->in[i].state == STATE_BOF && + fs->in[i].before == EXT_STOP)) + fs->frame_ready = 0; } fs->pts = pts; }