From patchwork Wed Feb 14 17:25:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 46272 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:b819:b0:19e:cdac:8cce with SMTP id fi25csp79658pzb; Wed, 14 Feb 2024 09:24:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX1WMGfNJQI6/zW17NrUo1qxso5GXoKllLfnpNVJIXUcT/mmmlw1JXdhMH+w2Zn3wbm2sC9/z1eXlNh+XomIeUdfIC/KhQYVsQHEw== X-Google-Smtp-Source: AGHT+IEm3dn1neaaVxJr337ssfO7xGnsAADU24z4VtXtunbx+y+VbSCqaiF8QScUZj+ut4FvNKmN X-Received: by 2002:a17:906:e50:b0:a38:24dd:f44f with SMTP id q16-20020a1709060e5000b00a3824ddf44fmr2305154eji.65.1707931477169; Wed, 14 Feb 2024 09:24:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVzGBK4v/5TYtnvgwr/6e1qqAru1eTaar1Nb9jqicmK6JRcRrCQiLF6confoJLjqajIdksGIAW//zswfyIamgnaGnlu3amFR3Ya+aj7iCpWnsxp5KICkqQL3FmMvlcoyl352e3z1uYqfnlveEzXxy9g9D0CJDJDIlG6VByDmuujkXj8ZVE3VqDsEOI1iOYj2R5nowZUC3LMzi7188XT06iyssfbf4kEiHX3YYJGcYEqTQotFwNia92Q6TyrKVw8dDi1QXzeamyHXeu2JiaS3aZX7Yqqvsx+WGDQcjQfxk2Bp7BUOkXf+VFZq+67jvsugYh4WvFXdwpRrpomWNclDWKBgpD3ojv8e6iGY7ANF5gGR8cqvdHIui//3/oB8SIpDPeD8PRs8DrlbseJpHBPXilbe0VbUn/4vsi2yWZB1yhPeGMBe72FBXBwDvxKgCwI/V9/nAiEwgsDXz8/58Y632DVIbHR9dGDUuqk0IqMQ3RPvYPiUVR/+jmRS/S+0RMlVLW7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path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i8-20020a170906264800b00a38815c23edsi2462264ejc.778.2024.02.14.09.24.36; Wed, 14 Feb 2024 09:24:37 -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; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=cZTHGNLj; arc=fail (body hash mismatch); 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1E9F668D212; Wed, 14 Feb 2024 19:24:16 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04olkn2100.outbound.protection.outlook.com [40.92.73.100]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1946668D213 for ; Wed, 14 Feb 2024 19:24:13 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CqQcR0OZirx1eCxBB+0kP9buZVNB52iE6K//Ri6F8FiSiWnISxnxXp+5/eW0w9TZg6NHvW35ioHxFzkLAsPFrGwsnWwl5tsGq5MW5OEJ29p5+bo/1AmjU+h0Cq3e5nbnWDUouWSG65sx0Llr5zn+Igpu5xtU0KgsdfEV93ex6ubv62wj4hQYcIM7hUw8O2B5JDy8Y7LfRVN3jJyasbzfe3TWwS4uj09so5l90ghYGo2ShsBQBUYKNOpJMRTcnIr4Mg0tSF3mmNh7HDJzjnweUboGop9+LZpIavjOcfqptc4Pe9sTmdaRLAmuSfPyRA46mH7SUSPW5HkAG445APSVSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bEyo/dTcvpNvdojrV8nUxac5tr/nW4RK7FEJGt/Gw9M=; b=aaoED0/FIuac/4EMa7lh8M4R96QbFy/4HmL7+NsLzm1Mjgsh+sPDGHeKfzrFtq1dS9eaqQZxwAkDJLgeBbBvm+mbYMk5pBQBRJi2dbfLtoSh6ahfD4UeZTN3XGgPw5adbIz2IxNim0v1qyZyT4nnCccfwcxkeCxIDERtaiWueWbpaBgwTHWAzlwVx1hQYnbrFX2uJ6EHASU6rwB60YoaDDeVKfKLjd8QYw10vFJnZIrjIvlOxAs3pLnD1Sa5qJQFYsd6SR0uVlNhwfuGKDs4UYJyhXPYr0z2oIN2nObn1vWntiuI2RXYoA4GuasO0Re49/6LcdUG3L4BqCg61DsO+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bEyo/dTcvpNvdojrV8nUxac5tr/nW4RK7FEJGt/Gw9M=; b=cZTHGNLjcx54IzhGcjphjNSa+VJQPTpmTcHZic6UQydtOhhQwmwwb+VqPIk74WUj9bKhDYOiKpGtWRgePdcwwoNdfn4uN3fBFpgyUqR798CW/OaiDYsx0S7nJbOZ7pkC3OLkiztyo9TZXqljlGR+XWFsNNb/jgB+cqYHVn53V0HZKqYUFFbI83hmdSbTsMaIb71oN4y7LmjE14od7FzVajTQNf1p+2EWk6unhSJydPfl4bIauwMleK6D6audnNzNAUuwIET+ArdQQ8+y6S4h9pcwLnWn9YX3TnRhfTvU67rZhQps1D1B9i5tE3QpKHmHosQf6RAZWFG3sixHPwu/PA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AM8P250MB0374.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:329::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.39; Wed, 14 Feb 2024 17:23:54 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::65aa:deb0:a18e:d48d]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::65aa:deb0:a18e:d48d%5]) with mapi id 15.20.7270.036; Wed, 14 Feb 2024 17:23:54 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 14 Feb 2024 18:25:35 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [2LBBwrkciPjM4uzK6piPyeFyZO9BNvm6kBnriWwypJU=] X-ClientProxiedBy: ZR0P278CA0001.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:16::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20240214172537.1099404-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AM8P250MB0374:EE_ X-MS-Office365-Filtering-Correlation-Id: 79f282b6-466d-4e73-0c4c-08dc2d81b837 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Lx3LaY8Bb1CnsdT+mKWx5heG6BbhRcu4DvucZ81EsIrQ54oeyVwMwTJzOdI6Bz0P4qRXTrHizRlX5yww+aGJVq8eDEUavvGg75Nhf4PR4m4m3AH5gfCfobQ3kI1+pOyMlTPuqhlCt4l7VvHvqj47q5WRBgW7SkT1lZM05XB9EWagwQeD0XrVlMFH0IwvWwrZ6TogJszVZGsgluMhL4oX/9HE12s95wG/C88JSTHKEJU98EfLlAVlmsNfCag8Icu4rWo/mANqarEz8BCEKWJycC0Mhsxxc2EI4ZmeOCE5pJtoAW6FkAPj5fysmVU9E6oLenXQf/UnCcxRTxXWUVsJrKWg2wBl5maVObByu3cDjGWXAUAEJI2L1Ro1eCCeri/YMikpp11Glds11mlnQ982WZkdJcxe7enAsrcEJfB/tZCK9zC2wShMgeaTFQiwwnzt/AggHFLqu0S9hN1EMwItfxq0t7M8wKL1UKLXZyCTA4xIw+schXqd4F1MzuXr5cr10GQtFaJ76MIWdx3BlB8behAxJV5SyWAxmFlmGFfWX0e67rVRSYBOCSoP9oFvWkUyoi/5zYkWQ1nlwpsenXrZni6MT+06fjSLzSwrAeK1bXTDPGP+d75Ct6q5TLR27JX+ X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RLuXCljAiLXcccoUKsOJ6BWP924btz+PzYZcUZ5XN24/kL7enszwQ4oui76SWHXZqEpbitEl0HLsgNL4fOEpu9oJb766Oqx4mLtmuvcvw8AbtnimOf9oRWQzikbgdehwTHPzulCfc9+2VNFKPCe8GJ+4B2l04hI1cLoU+Y3BCUK680+CrNegnT1wzy3fALU+oCnTch+mnZq0/atuH9/t+gfveIERxhRi0+9pK09oZWryncTIEnUIsrmhk5KZnaXzfVe8JvX32cMcQSrME9uvCk2WkrljhQR2JQ5Q7MjmUALxBc4cInysK43i+W9rEKE7WzDTD88L3qPhxxl6Kn85YX3ZElVVzhUVE4N5bPz6mL5IdpqLPujTFO8h9jrrzQSfFY1H8iLHfYxvwOcPD/AXsmLz4X0K8bPsurCt24XGaW8c44j7cQYbub7ZmJ+ob6YhjhreKqn7923xU7iq1dBEpd4EXBUqOUoU2MlfuK6lnrO35zQLASiK8+2i8OJCvZltWF4GvJM+Ynm1vePp8I+ixFuo8mv53QdaiN6kb29IhIcjzr4Z/6Fc+zVzKns1JoX5OWvXca11IZQcyzdI/jqZ1rEYdcv/VIdacN2LVL+wZFpOhbA9Stg8aGiiPEzU6xLkbNhQLqBxaw2zGyyYRbqyfElY3QL59kUPBowiHRVs2iUynBMwTd5f524+mPkhFLWkqShFCV+OiaUykqT5R7Wjd4pwQckTNkZIDgofvSSt3yNwRqHwEUBQtvcK1Aq/SGuKjzxM4ZBIaxdMK8fxcbOEMrCuhCT2LS7zCHo95OARl5t84kp13mPfnjgsRAxUChCZ8wERvZ7udrOFbCJhoAHA4KwwCoCwdAbKW5wLeHIPLUNpziC0NPj9oIYq+NNYeeZhYDUPySD6s6d25piRwOJpW1i8m3yyZm7eS9LFyX0mzMiDpCHuIaqZdF8EDunzvdfO9N7ETa95pTLOy9rSXJ1OIMrtl4LBd0ZAT0m3IMgVmcZm3wCB1/1b8ycql/4YRr/oTkP15rHmwC8+yw6f4V1BNyH/ZWgU5ysMFj3BBIEKlEh8e1R+JyPkEax1BiOz7ngNeubsXcQawVi4nB8xh1NyHgRUmkE26N98A2TRsWfLeMUtZ0IUzKz8BRuOzxeXEVCKKf2DURZSKpytouHXnPMp6UzViJRuW5Mg2YFKZCX7OymGzNu7hPuqeGMRqok7ehWb6bJchagEeGYhCeqoTC6cFxWi0DLEFK1kCy4gkzMgloME2Fc7r3H6wAseVMHyqEwEuP6i/mkjQG06IF8As+N41Q== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79f282b6-466d-4e73-0c4c-08dc2d81b837 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2024 17:23:54.6339 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8P250MB0374 Subject: [FFmpeg-devel] [PATCH 6/8] avfilter/avfilter: Move init_state to FilterLinkInternal 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 23m2NIOQC4n1 Signed-off-by: Andreas Rheinhardt --- libavfilter/avfilter.c | 7 ++++--- libavfilter/avfilter.h | 7 ------- libavfilter/link_internal.h | 7 +++++++ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 796ec29afd..a3f8c403c3 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -323,6 +323,7 @@ int avfilter_config_links(AVFilterContext *filter) for (i = 0; i < filter->nb_inputs; i ++) { AVFilterLink *link = filter->inputs[i]; AVFilterLink *inlink; + FilterLinkInternal *li = ff_link_internal(link); if (!link) continue; if (!link->src || !link->dst) { @@ -335,14 +336,14 @@ int avfilter_config_links(AVFilterContext *filter) link->current_pts = link->current_pts_us = AV_NOPTS_VALUE; - switch (link->init_state) { + switch (li->init_state) { case AVLINK_INIT: continue; case AVLINK_STARTINIT: av_log(filter, AV_LOG_INFO, "circular filter chain detected\n"); return 0; case AVLINK_UNINIT: - link->init_state = AVLINK_STARTINIT; + li->init_state = AVLINK_STARTINIT; if ((ret = avfilter_config_links(link->src)) < 0) return ret; @@ -413,7 +414,7 @@ int avfilter_config_links(AVFilterContext *filter) return ret; } - link->init_state = AVLINK_INIT; + li->init_state = AVLINK_INIT; } } diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 1d2909e28d..5c6e34e8fc 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -611,13 +611,6 @@ struct AVFilterLink { */ AVFilterFormatsConfig outcfg; - /** stage of the initialization of the link properties (dimensions, etc) */ - enum { - AVLINK_UNINIT = 0, ///< not started - AVLINK_STARTINIT, ///< started, but incomplete - AVLINK_INIT ///< complete - } init_state; - /** * Graph the filter belongs to. */ diff --git a/libavfilter/link_internal.h b/libavfilter/link_internal.h index b5a8ac89ec..030eb24765 100644 --- a/libavfilter/link_internal.h +++ b/libavfilter/link_internal.h @@ -59,6 +59,13 @@ typedef struct FilterLinkInternal { * corresponding code. */ int status_out; + + /** stage of the initialization of the link properties (dimensions, etc) */ + enum { + AVLINK_UNINIT = 0, ///< not started + AVLINK_STARTINIT, ///< started, but incomplete + AVLINK_INIT ///< complete + } init_state; } FilterLinkInternal; static inline FilterLinkInternal *ff_link_internal(AVFilterLink *link)