From patchwork Sun May 28 09:14:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41859 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c51c:b0:10c:5e6f:955f with SMTP id gm28csp987711pzb; Sun, 28 May 2023 02:16:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4iT9aCdX3SgNy1+D/GVldiJ7ev3bCcOU2gkDMxn6LE9umVKLxFyWjA6iEwXNeZZyY31Wso X-Received: by 2002:a17:907:7252:b0:973:fd02:a41f with SMTP id ds18-20020a170907725200b00973fd02a41fmr923849ejc.40.1685265393002; Sun, 28 May 2023 02:16:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685265392; cv=none; d=google.com; s=arc-20160816; b=VtI/lhPczjI9l+LhA0obMhLQVi3DVwfhnIzWmUXk/2c0K40WFPjWHYAXnntuyUKghP JwbdLbuTyP35UPpbucP/RjId5yj/6fGIWgtmFvhVO1sMTBwfiRvrqSTetcoa41XRecM1 fbJdTbOGYiVkxP7iw4TeJciTDshrfiT3QrZQhFR+XrNdYVje2HcxUzKHiEiDnrpk8XO7 OHoGT4ZJBIsFLH01Ils15hksGvcdx7gjb04853AG3xAH8hXGju8grDaBF2aEnBIo5oDs dVuAX95fiU6DNgWimkvku2+Wa32Rn4XYOFVlus8yqbcmDzObHQw0aO3Y5dRUTellwhl2 OhYw== 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=2CqhuvuO4maKKPAWxAamP0BOccPE+xcIptkA6hCPjMs=; b=nfWZ9vzNQHY6spFIsESJxo67dZYDMYif15p+AH0wxDXAMLf5M5jw8tXhuM8IMUnI8K v5/4GAKEWTpytMiHNXCkT5iIXbyohTlxgm4b1f6jaN/eK0PQIuUg630zvEu1ikCzu2p8 rhizAWtudqOiXwfWV+Gk4CXr9tRRjnwD7Jn+Dld+boCgyIjULh0TcS4Z2dUywOJR7cM/ fIW23rUoPGODMxXgMZP1xrXQvllfbPW7HJFUyyGlGw729ZNPGDEUNm9iR9S0vjXVR/h2 /wDpRJBzsjAt0WVBaEGg6BaHbyq7mb7HpgmZmHDAl+0OkhYz7yBjNX7G2WcWyX2MENRI gcOw== 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 vs3-20020a170907138300b00965604f0e3asi4136232ejb.808.2023.05.28.02.16.32; Sun, 28 May 2023 02:16:32 -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 D3FE868C256; Sun, 28 May 2023 12:15:05 +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 1410968C1F9 for ; Sun, 28 May 2023 12:14:57 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id C74032404F5 for ; Sun, 28 May 2023 11:14:56 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id JgD4NPDW7YPp for ; Sun, 28 May 2023 11:14:55 +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 BEF692406D0 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 EB55A3A0D6F for ; Sun, 28 May 2023 11:14:41 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sun, 28 May 2023 11:14:12 +0200 Message-Id: <20230528091416.17927-20-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 20/24] fftools/ffmpeg_filter: make ifilter_has_all_input_formats() static 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: zuWAc7FeXbvw It is no longer used outside ffmpeg_filter. --- fftools/ffmpeg.h | 2 -- fftools/ffmpeg_filter.c | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 75695d3fb5..398bcc58e1 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -751,8 +751,6 @@ void ifilter_sub2video_heartbeat(InputFilter *ifilter, int64_t pts, AVRational t */ int ifilter_parameters_from_dec(InputFilter *ifilter, const AVCodecContext *dec); -int ifilter_has_all_input_formats(FilterGraph *fg); - void ofilter_bind_ost(OutputFilter *ofilter, OutputStream *ost); /** diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index e0843b0729..9c29850a26 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -537,6 +537,18 @@ fail: return ret; } +// Filters can be configured only if the formats of all inputs are known. +static int ifilter_has_all_input_formats(FilterGraph *fg) +{ + int i; + for (i = 0; i < fg->nb_inputs; i++) { + InputFilterPriv *ifp = ifp_from_ifilter(fg->inputs[i]); + if (ifp->format < 0) + return 0; + } + return 1; +} + static char *describe_filter_link(FilterGraph *fg, AVFilterInOut *inout, int in) { AVFilterContext *ctx = inout->filter_ctx; @@ -1660,18 +1672,6 @@ static int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *fr return 0; } -// Filters can be configured only if the formats of all inputs are known. -int ifilter_has_all_input_formats(FilterGraph *fg) -{ - int i; - for (i = 0; i < fg->nb_inputs; i++) { - InputFilterPriv *ifp = ifp_from_ifilter(fg->inputs[i]); - if (ifp->format < 0) - return 0; - } - return 1; -} - int filtergraph_is_simple(FilterGraph *fg) { FilterGraphPriv *fgp = fgp_from_fg(fg);