From patchwork Mon Mar 27 05:15:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 40854 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:7a30:b0:df:834d:2c1a with SMTP id t48csp1047957pzh; Sun, 26 Mar 2023 22:16:36 -0700 (PDT) X-Google-Smtp-Source: AKy350b1xtn2w4Q8kgOgbbqmwvDrma15BBxhOmbHHVwCPgJkHsu1h185i26p2LiMSYQU1zkQX7uf X-Received: by 2002:a17:906:9148:b0:932:29a7:56ee with SMTP id y8-20020a170906914800b0093229a756eemr10479116ejw.12.1679894196168; Sun, 26 Mar 2023 22:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679894196; cv=none; d=google.com; s=arc-20160816; b=IGssiaF+bqfhrZMBokzB3S3JM3Ld6xMc2q9dR9L8woaiwbPDyw5NpgpmTboTmFlsMd +5C5kbAm83IlF5m7UOQL7mAm/mP/ZX1ukSpDW3Ginub6hck3BvGU7FtQ4U7l7NW9g1X2 bF4sPUqXoHDxPZX2+/L5vSRtQp8rGI5mdxSTe9pyihDKqjoqvO/WgbVfEw15BAC17Vq2 CmwIbW8srcDstDw9kpMTPRDP4rnqYSHlafYV9xQUIsoL93e0Hssmter5X/SEewTfl9ip tGrLhHYfkTLi8qJFxylbSYEE4BQR4VdTw72JtiQDsaezcPVf4lYq1J1s9Tjv8LlfoN4N yHiQ== 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=0ycZ6miZSpVMmoi8bKlHAzCWFSbDiuZXPamT+5mSldY=; b=LXBquBxIuPFjpk4+Oge8bWATBqH4VtZh6QQcUyM29thCNHd3zlDQ1bNtwl8+/J5WHL WcI7ASreAsdMb/a3p4Z/0/S6fF4TTJvPZVEIeI84zRIJQ7khqyN+Y+2bfRXDb3o4Hqe0 Z/jsdpJSSUJyw28LAByw2Nw1QFzdMS4AH0H+5hd9HS92dWA4LbZ2pkreLLS9eWBpyvAX ExoT0qt4MhtTvzhZBI5vHRM+Z7rOzqfG0qm+1XEA/SGEk7dkFdz8mGthW1ZTgNZgs+pZ Dy5meyDBTZ9oA2oT6lBKbuj9nx7Yol/mLWZ/KAdAjuw7uXrSeVFWnVT8DG8hVs3wAMxl f06w== 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 ss24-20020a170907c01800b009334a8e8c07si21951509ejc.103.2023.03.26.22.16.35; Sun, 26 Mar 2023 22:16:36 -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 7BF0F68C75F; Mon, 27 Mar 2023 08:16:32 +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 91B2D68C55C for ; Mon, 27 Mar 2023 08:16:25 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 04E282404EA for ; Mon, 27 Mar 2023 07:16:25 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id z-EKhsdquGhh for ; Mon, 27 Mar 2023 07:16:24 +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 6B6DE240178 for ; Mon, 27 Mar 2023 07:16:24 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 0F0B63A00B6 for ; Mon, 27 Mar 2023 07:16:18 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 27 Mar 2023 07:15:56 +0200 Message-Id: <20230327051555.11023-1-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230325214349.GA375355@pb2> References: <20230325214349.GA375355@pb2> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] fftools/ffmpeg: do not return finished streams from choose_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: zqIPkaA3xyLR --- Should be fixed by this patch. --- fftools/ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index ae69d29ab7..f1fdbd47eb 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2402,7 +2402,7 @@ static OutputStream *choose_output(void) ost->initialized, ost->inputs_done, ost->finished); } - if (!ost->initialized && !ost->inputs_done) + if (!ost->initialized && !ost->inputs_done && !ost->finished) return ost->unavailable ? NULL : ost; if (!ost->finished && opts < opts_min) {