From patchwork Sun May 28 09:13:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41850 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c51c:b0:10c:5e6f:955f with SMTP id gm28csp986698pzb; Sun, 28 May 2023 02:15:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7rgdBfqF3AwirgIU787f+M16t1X8wMY1BChtcu0CrNee0lDwfSRuD563NVNqIO3Tq5MICs X-Received: by 2002:aa7:c495:0:b0:510:ef30:b593 with SMTP id m21-20020aa7c495000000b00510ef30b593mr5589872edq.11.1685265301142; Sun, 28 May 2023 02:15:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685265301; cv=none; d=google.com; s=arc-20160816; b=enYfZF+LysuY3nu7v3p9rOZ3WVJ/eA7mkvhqHSgvHBz999pKTymLc1xUxCJjyJOxnf DwdtMRL8eb4dbRJxOwABfhVUoFFQAw49unCZ0K5+5VZQjjY8CdOp/h2+a7gxn5xR46Ud L1WdT5YjGe+/s/usIKbFpTRNBnERm0aIaqu+Vdk/YwBAN4Yp7YNtV5BkwRThwi4cKSdY wj+2sP7jjRXHKjArho+nTWLjYfJVJAbdZJk6YoTNGgsThKesSyIsh16MlgZN+A3B4Z7t trMngw4KEhk68kouEUx5vO+VQXqFq53vOMnXfawaeHceRhURgj8sEFayhMHl4XKOnvbP EEMw== 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=5//evQcQIinBH7iohRH6ocSEmbjA2Ht5DsBG57QbyHc=; b=K/8TE5/Witqg0WO3Yybr4qf1PkDra+p7SH3skHFOUfutiVP6i8sELgRDkBNz9jHo09 79Blp9Y+g9V699xU6M0I+U+77st9BVb5AmmOfDH020MRVJYMYIUfMpx0Yd8A0wZGDobp p3y010WDtIwSFCbuL3YiURxC7GcbtzJdMz6Ncw5gkvKQpw2WK+sAF+f0EVygI4QuVPoh ehXopDTgmmUkTaK2ZS3mobqpbTmGDaHG5Ete27dHFgj2lW2V0+cwiP1Cjs2v8lT9J9hi MDu90ng+waszfsIsv/NcTD3+A/ZDXYHErcqBqkoqoHh09lyf57Xq3Dqx+BW9K+5lf1Wh wi4Q== 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 t18-20020aa7d4d2000000b0050bc27dd649si2798393edr.616.2023.05.28.02.15.00; Sun, 28 May 2023 02:15:01 -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 2CE3268C1E5; Sun, 28 May 2023 12:14:55 +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 C502D68B947 for ; Sun, 28 May 2023 12:14:48 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 17A10240D1E for ; Sun, 28 May 2023 11:14:48 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id kNqK6YxJOYAG for ; Sun, 28 May 2023 11:14:47 +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 7B1D82404EE for ; Sun, 28 May 2023 11:14:47 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 294753A04D0 for ; Sun, 28 May 2023 11:14:41 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sun, 28 May 2023 11:13:55 +0200 Message-Id: <20230528091416.17927-3-anton@khirnov.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230528091416.17927-1-anton@khirnov.net> References: <20230528091416.17927-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 03/24] fftools/ffmpeg_filter: use a dedicated variable for marking simple filtergraphs 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: fR7ejatyU/vZ Do not use an unrelated graph property, which will change in future commits. --- fftools/ffmpeg_filter.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index f37b867b31..e11ae2e9bf 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -41,6 +41,8 @@ typedef struct FilterGraphPriv { FilterGraph fg; + int is_simple; + const char *graph_desc; // frame for temporarily holding output from the filtergraph @@ -353,6 +355,7 @@ FilterGraph *fg_create(char *graph_desc) int init_simple_filtergraph(InputStream *ist, OutputStream *ost) { FilterGraph *fg; + FilterGraphPriv *fgp; OutputFilter *ofilter; InputFilter *ifilter; int ret; @@ -360,6 +363,9 @@ int init_simple_filtergraph(InputStream *ist, OutputStream *ost) fg = fg_create(NULL); if (!fg) report_and_exit(AVERROR(ENOMEM)); + fgp = fgp_from_fg(fg); + + fgp->is_simple = 1; ofilter = ofilter_alloc(fg); ofilter->ost = ost; @@ -1474,7 +1480,7 @@ int ifilter_has_all_input_formats(FilterGraph *fg) int filtergraph_is_simple(FilterGraph *fg) { FilterGraphPriv *fgp = fgp_from_fg(fg); - return !fgp->graph_desc; + return fgp->is_simple; } int reap_filters(int flush)