From patchwork Sat Mar 9 19:01:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 46918 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dc95:b0:1a1:738b:6bc0 with SMTP id ky21csp390087pzb; Sat, 9 Mar 2024 11:01:47 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVyz8ouVItQHNi9FEIISEIqx2pcQ+ruMUYclNao/RGCXmbsd9SUxd27PzOGJwcv7QYtZLZg2iYTsvssgEGL5xXAKuLMzLCakTty2w== X-Google-Smtp-Source: AGHT+IGs55Tb0KzWfsXNTLM12cokVvDwqItw+Mseix3jPyi7eOTSxHlX7nAIDKiwBt6M4Ky/QOki X-Received: by 2002:a19:690a:0:b0:513:3f81:224f with SMTP id e10-20020a19690a000000b005133f81224fmr1349544lfc.37.1710010907371; Sat, 09 Mar 2024 11:01:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1710010907; cv=none; d=google.com; s=arc-20160816; b=f3wYPyh5HM2VEIpzQYd6aLaE7V/emOrNAIpQaM84vXRuUJAzvPKxW8YcHyX8xYrypG D4gBtLatRLLVlwyUzDg/p5ED+9vYwjSaxNhoQFKTxHJmRfgv1U5VuqpZ/z1Cp3/pDsqp Ke9g4TBtIjXeHb+aICzqyduZPS5gFa3uOTL9/WqXTbuK/mPQmQ6cY9eAgsyZ4/geU7xV KTMP02FjrI0zcpViHFMdtD2wxYILY9265yiztDx2agc5IuoIsBS/5HtEEV1CiMBsKnWu G1S7fjmWSUKffBb55rJP8rgjhk3qgsbE0QDK3pKoj7p/TkfpR0nkK4zvQl2wOyS1572R bpNg== 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:message-id:date:to:from :dkim-signature:delivered-to; bh=ggbh/2HZQ/wh62NpRVzWuIOKanfarNHPu++cPhqlGy0=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=e+AecLmpzbjf7r8FefsrEIGPLG0c3CDT5NDqtS4Y0z441AzjqKQjjZhsmU9ygiSgDE k3faouNMg3ndru2UqLyX77c0pwfPtlofbYZjRmHWKy3xzsCNBbiQF/qLXjB7adxWpWLC PpOOhfRulj98zCY3bZjsKRzTkTLW7yufautj2ToHTCvTw3l8W2d6PcbZcIWEtgIObUI4 Bv6lpjEnYFnfv5j8nEH7v1IBZUN4aoe3r3AjEYL222Yzld54iSIlA4Ee0vPcQZ/MwiNS LmdZKnvghf2z3uV8WsISbgeJfKnz55v+JFk30zCvIpF2xbcAZXypFz/D5cwz742kUW3p 2QQw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=hCJdjyx2; 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 ox11-20020a170907100b00b00a3d2bafe1acsi997878ejb.759.2024.03.09.11.01.46; Sat, 09 Mar 2024 11:01:47 -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=@khirnov.net header.s=mail header.b=hCJdjyx2; 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 DFB5F68CCF8; Sat, 9 Mar 2024 21:01:43 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E9D3F68CB56 for ; Sat, 9 Mar 2024 21:01:36 +0200 (EET) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=hCJdjyx2; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 0EAB74482 for ; Sat, 9 Mar 2024 20:01:36 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id PASZbtnhLbEo for ; Sat, 9 Mar 2024 20:01:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1710010893; bh=Far5tCbuuT2bvqsDnLVkfP3Eg6R8HMx/jZNmBum1SEM=; h=From:To:Subject:Date:From; b=hCJdjyx2QZDPg0gPkN1ng1i2jtsb9yvQGTSJt3LdV9FSSeaZDPySHxSpYVFFh79T0 aZ5VCtzUayp4FAZqezpf+wRJFJ0wej1l4+et7V56cp9Vtj/lyY6MnELi6DUkIq96CU Fq50NyBSo2OApqzuhhvzavyIMZbCajI83h8HFm2tAtc5XxZds2c5prKoUCJySezy6r 74UqG+VwahBgQf6j1XcBff9FZeTC02WshWxI1jf8WXjNxa2bpZV5U9NThwChBZfrVq BaKsIpsIfjQvgU/Y/3jS9mb9ceentuEeWiuPxSEBWa4RewvSchzzdUAYqRLaA+SrAq wgHR+Db8ZvODg== 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 mail1.khirnov.net (Postfix) with ESMTPS id 7C0C14D03 for ; Sat, 9 Mar 2024 20:01:33 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 3A0463A03D8 for ; Sat, 9 Mar 2024 20:01:26 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sat, 9 Mar 2024 20:01:22 +0100 Message-ID: <20240309190123.8110-1-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg_filter: don't forward EOF in close_output() 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: IQHDySu2gNy2 The caller does not need or expect it, and it can lead to terminating filtering prematurely in case there is more than one output. --- fftools/ffmpeg_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 960393b943..7cd5415341 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -2199,7 +2199,8 @@ static int close_output(OutputFilterPriv *ofp, FilterGraphThread *fgt) fgt->eof_out[ofp->index] = 1; - return sch_filter_send(fgp->sch, fgp->sch_idx, ofp->index, NULL); + ret = sch_filter_send(fgp->sch, fgp->sch_idx, ofp->index, NULL); + return (ret == AVERROR_EOF) ? 0 : ret; } static int fg_output_frame(OutputFilterPriv *ofp, FilterGraphThread *fgt,