From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id A283647676 for ; Tue, 19 Sep 2023 19:21:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EDB2868C931; Tue, 19 Sep 2023 22:21:05 +0300 (EEST) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4B6A568C923 for ; Tue, 19 Sep 2023 22:20:58 +0300 (EEST) Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id EF9895101 for ; Tue, 19 Sep 2023 21:20:57 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id hNaMuXUWiR98 for ; Tue, 19 Sep 2023 21:20: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 mail1.khirnov.net (Postfix) with ESMTPS id 460535116 for ; Tue, 19 Sep 2023 21:20:42 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 38D8C3A1715 for ; Tue, 19 Sep 2023 21:20:42 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 19 Sep 2023 21:10:32 +0200 Message-Id: <20230919191044.18873-6-anton@khirnov.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230919191044.18873-1-anton@khirnov.net> References: <20230919191044.18873-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 05/27] ffools/ffmpeg_filter: stop trying to handle an unreachable state 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: ifilter_send_eof() will fail if the input has no real or fallback parameters, so there is no need to handle the case of some inputs being in EOF state yet having no parameters. --- fftools/ffmpeg.c | 2 +- fftools/ffmpeg.h | 2 -- fftools/ffmpeg_filter.c | 10 +++++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index fd2ce1c2d0..14f55cbec7 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -944,7 +944,7 @@ static int choose_output(OutputStream **post) INT64_MIN : ost->last_mux_dts; } - if (!ost->initialized && !ost->inputs_done && !ost->finished) { + if (!ost->initialized && !ost->finished) { ost_min = ost; break; } diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index b059ecbb9f..2e8f1db9b6 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -583,8 +583,6 @@ typedef struct OutputStream { // parameters are set in the AVStream. int initialized; - int inputs_done; - const char *attachment_filename; int keep_pix_fmt; diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index b6348d7f87..804b9de3dc 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -2076,11 +2076,11 @@ int fg_transcode_step(FilterGraph *graph, InputStream **best_ist) } } - // graph not configured, but all inputs are either initialized or EOF - for (int i = 0; i < graph->nb_outputs; i++) - graph->outputs[i]->ost->inputs_done = 1; - - return 0; + // This state - graph is not configured, but all inputs are either + // initialized or EOF - should be unreachable because sending EOF to a + // filter without even a fallback format should fail + av_assert0(0); + return AVERROR_BUG; } *best_ist = NULL; -- 2.40.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".