From patchwork Wed Jan 24 10:46:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 45790 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:120f:b0:199:de12:6fa6 with SMTP id v15csp1187450pzf; Wed, 24 Jan 2024 02:46:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbjMK0igOJOE/6XeuJUJB9l/w+Ve2+OqPT8/YkkaawXcQKmc+tKhEKP9cGSSdSr92vgLpi X-Received: by 2002:ac2:4c83:0:b0:510:ca4:a09a with SMTP id d3-20020ac24c83000000b005100ca4a09amr879105lfl.17.1706093218432; Wed, 24 Jan 2024 02:46:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706093218; cv=none; d=google.com; s=arc-20160816; b=YTKp9xI5oskT31FV+8uePCrfw6xu1lVk0Q47nwiFJAk3xV2LP484u4sfO78tX75iEv xnXG/KBlOMTj/0fCaeWkJusjQX5YsCh/SICvu1dcathG4Z4+BX7eQNvHm8EmjGLMnM9L KKUMMHiPz5sKJshNUrM7qLjjixp50tz3xPrq7h/ZDLHE+W+/pez+A/eZLcNO5OUlf3Gg yAjlnvOTUmv5dX80h6u/pTIptZZwCSAkMeSczM+MHyD/SLI2YEyMBYMBCYuGqus+jQK4 3hj/8yFweRV7jYi14mk7niJX+X07LHVmLcXRgN1JA1Xd9oiorjYl9QytUi9pWO6bPyFq KJmQ== 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:dkim-signature:delivered-to; bh=ZdK5zM6hC0ZkgrZ0Lmo9j5UOrOhL6daObTNi7vNwCW8=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=bis5aB8v7BZsLl4hVlzLaMEmWYTiDE1QavZFLaabXKeUBdh6jiu23+lyCSK8mxoKVX YeNE0ERJSjjvy8CW2GEIdoM4R7uGodEck83k1cntAAnuVpzU5WrcvtbaUJnEnBpKihCU h03/r8upF9I6IK7GaODW1uq9LjJwfUJY2nUGEZzMgjEVkrJdfVTCCCzKKUsRp/+4xztX 5rtABOcXSS0gr9TcMvWRh4S+AjUQv7DZEHtPegUkdUKxBmgOofIG4oyn11lREJ0K9Cd6 1Tb8WGqZAWyP1l5Z/1bRWrV7/iCVl/PR5leTg4DltUb27padrCIqbBTDxY91rLubcO8X FOtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=V1PIXFca; 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 lf22-20020a170906ae5600b00a30f3095e45si1074224ejb.535.2024.01.24.02.46.58; Wed, 24 Jan 2024 02:46:58 -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=V1PIXFca; 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 AC8EB68D0DF; Wed, 24 Jan 2024 12:46:37 +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 E5F9B68CFE2 for ; Wed, 24 Jan 2024 12:46:27 +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=V1PIXFca; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 6A9141A22 for ; Wed, 24 Jan 2024 11:46:27 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id AE301xGavOOr for ; Wed, 24 Jan 2024 11:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1706093186; bh=DkHd/VktNTAEPCNNHgW3N1y9h7Gbg3nj+rEJdtij/dc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=V1PIXFca5cjnqwXwiVqbOw6zKsYaeMEOrYIvjNK+TlbyUFBko9GxqNbExj04TNh0z 28YuDg886XNhe4XneQRhpp563hIsNbDeq/rgMGWGIOw0DGYPeljp2+2NsGiJqvM7cd qQT69Y/KC/MHj4a+i6Qikm0gqDu51CWXevKzyuMaUf+PgPdTeJy06CxBtrOOcCk0z1 WNRpdT8QG9BhNIp0lHn5QbQVE8mVgBvUQ11H0CQd8e6/XGbriVDeX1AiEUHefc1xk4 pMbjDKxi8DR0zGVo6K+v/AEPQFM9UqUEz/kcY1a9Hmm3IARfPNWUoa+UVmMzPbjVAX 3uF+OX1PDbNVw== 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 0171319B9 for ; Wed, 24 Jan 2024 11:46:25 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id D77AB3A054A for ; Wed, 24 Jan 2024 11:46:25 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 24 Jan 2024 11:46:21 +0100 Message-ID: <20240124104622.24343-2-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240124104622.24343-1-anton@khirnov.net> References: <20240124104622.24343-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] fftools/ffmpeg_filter: do not end filtering when a graph input EOFs 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: fnzkaEZU3bOO There may be other inputs or sources in the filtergraph. Propagate the EOF to the scheduler and continue filtering. Fixes #10803 --- fftools/ffmpeg_filter.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 82ee4fae7d..ab64b4610a 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -2871,6 +2871,12 @@ static void *filter_thread(void *arg) ret = send_eof(&fgt, ifilter, fgt.frame->pts, fgt.frame->time_base); } av_frame_unref(fgt.frame); + if (ret == AVERROR_EOF) { + av_log(fg, AV_LOG_VERBOSE, "Input %u no longer accepts new data\n", + input_idx); + sch_filter_receive_finish(fgp->sch, fgp->sch_idx, input_idx); + continue; + } if (ret < 0) goto finish;