From patchwork Sun May 28 09:14:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41870 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c51c:b0:10c:5e6f:955f with SMTP id gm28csp988528pzb; Sun, 28 May 2023 02:18:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5f2I6hVy7A6qgPUZ7qEawgkUAIfLCqld2N4pAt12UlaEUX5eRbBaw6NmCVw6eI2QvrHlte X-Received: by 2002:a17:907:7e8a:b0:94f:3980:bf91 with SMTP id qb10-20020a1709077e8a00b0094f3980bf91mr8535935ejc.19.1685265489430; Sun, 28 May 2023 02:18:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685265489; cv=none; d=google.com; s=arc-20160816; b=PFzQrlbpA/joBR/Gza4WZZHUCJiiDi4DvgNG/zuhzgppCB05K3a5stemvB7RDLGOb4 +glw5WRdBbvTw2y2avQYWmPiJ1F6KGhvcvIMR6SFjkQ5A9f0E2HdKGYwTSwiH0fQ6Dym 5KsbxIYfySy0jESeRQeotRlx2aaoC9kuVxjQi0LXu7UbjC9YdrOgoDuN9MIqZmxoFWZY wWx8gGJ7/WhpyM+4L6N8ce5rEdUviV5zSHKLgtCOxRWeNs8GzZhbqXjBUAxMzkzHGItq e1uoMhanpvqkHXGoa+FiHVEZp+PaO8Tq/dXC0vXd0AHixsP0isBWukOD1WmfIAsk+VgD 8MSA== 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=iwCeU1wjBn6uusmDP9HjV99dXcs/p4buvJhgMrT2Ql8=; b=LhrL3p7A2qDR1wwQ/Cu/MhiwQ3w6wOQ0G/hyK713iVNTIiDdc9g0oJ+7lk4r4OgRIn GJSNhxY3SyUhg1Gmbnp/hhpSDQq//HI33MYtb22oQ7pmmWKX6GaPzd2VtQ4k6G42llQu 03zvqL+LNTpRzPekEF6rsuz7Z+Hk9fsQNLLUm60AkhMubyNhy6XZmqDwumlpoq9SN/RW i9OmaGzIMBtGJ06SOS7kkt2CPygqrWdu2QT7nWQP55bh8NG6JqYV+5VoFAX3d6gD8KYQ Dabt0GPv/uw8q45R8q7/PQq8tmBAWWi4v+3gyqLHl9zsUXUm4EQ0eFg2cExAUnKRRjvp RqfA== 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 h15-20020a170906260f00b0096f8fead185si3943760ejc.975.2023.05.28.02.18.09; Sun, 28 May 2023 02:18:09 -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 B6CCD68C27F; Sun, 28 May 2023 12:15: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 C98CF68C22A for ; Sun, 28 May 2023 12:14:54 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 1C9032406CA for ; Sun, 28 May 2023 11:14:53 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id qBB8tmcLr3Vu for ; Sun, 28 May 2023 11:14:52 +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 AE2CD2406CD 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 D51843A0CE0 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:10 +0200 Message-Id: <20230528091416.17927-18-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 18/24] fftools/ffmpeg_enc: stop configuring filters from encoder flush 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: gHxQ2dRFDBx3 There is no way for a filtergraph to have all input parameters, yet not be configured, so this code should not be reachable. --- fftools/ffmpeg_enc.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index f023657a07..6c9cce252f 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -1172,18 +1172,8 @@ void enc_flush(void) av_log(ost, AV_LOG_WARNING, "Finishing stream without any data written to it.\n"); - if (ost->filter && !fg->graph) { - if (!ifilter_has_all_input_formats(fg)) - continue; - - ret = configure_filtergraph(fg); - if (ret < 0) { - av_log(ost, AV_LOG_ERROR, "Error configuring filter graph\n"); - exit_program(1); - } - - of_output_packet(of, ost->pkt, ost, 1); - } + if (!fg->graph) + continue; ret = enc_open(ost, NULL); if (ret < 0)