From patchwork Thu Aug 25 08:59:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 37468 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp200978pzh; Thu, 25 Aug 2022 02:01:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR76sF0YwcUZe1pXqRIifT3xU74Aqq5Xa1U/UC+Pmpfp4jBL9RwLF7FGwlg0MMdnq9W6ms9m X-Received: by 2002:a05:6402:43cf:b0:446:b290:ea84 with SMTP id p15-20020a05640243cf00b00446b290ea84mr2308032edc.119.1661418094957; Thu, 25 Aug 2022 02:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661418094; cv=none; d=google.com; s=arc-20160816; b=RhWbIT9VCulIQyFCTWRH+3yvSlkfBDCziAeKZRngG9F4A31yczR6Ek7qjB9ycsIp5B rBwuSn87BJQjSiKs0vuDR6DobxaUjmVODwAy2yLnG1FnEwuZ5xbQumlDAPgE47o1U8Xf yUyHCt86B8Fz/gXbHCA9xLnSBqkYLSdIoCsl/p7vHjBmY3lhQMb+KaAFWk85y9WLAuHr VDtUMHzIFwnhltM67s2jLo5Sv1nT95HjaufEisfc6zUmB5BkpV7Zb3pPxwTfUqQqOtWd 6EBf68oonGpGXmHMa1dXcKRoRpwanEHGifzM/ZuTo8HlHjK4535eClPFfnYUcsfOBMbz 8jHg== 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=oueYAgi+HgPN3uK+YNmb923yjRK4qbGVB7fI0oGxsQE=; b=Twmr73A0Jf1E08HKGCNHjpIKecXtfcZpd+V1R27gvz5+2tz7LwCUbhYs0d6F5Scx4/ 1LVsER3fdyQTLRO7QiOCu+iK91Sk3pdctUEJ1jMN34nJw9UiK6obsdpFN8j4Grcj56dr AMob6o7tjrcA0SoGjeJN7BTFDJzUfDnBJFK2Ox3JEQxduU1ls6pqdsnSttTjYZGnT0rT ifw/KyEN/+yZ+G2IkLVBZQfOOZB03c+LrnwaqSsp5/neO6QDcy3PWXQQH5FcfZzWB2qQ +vTVOeTgTmKUQbLFmgq94La69sGC60rt7/Z2UTt9Rq8zTbaawPlKK9FKE0JiarN+KVq/ 3Rag== 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 dd14-20020a170906c82e00b0073ad0874d2bsi3106367ejb.97.2022.08.25.02.01.34; Thu, 25 Aug 2022 02:01:34 -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 ACBA568B9C1; Thu, 25 Aug 2022 12:01:19 +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 8CB2468B72B for ; Thu, 25 Aug 2022 12:01:12 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 49804240D0E for ; Thu, 25 Aug 2022 11:01:12 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id tsSUj6mtzvGc for ; Thu, 25 Aug 2022 11:01:11 +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 0832B240D18 for ; Thu, 25 Aug 2022 11:01:11 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 796AD3A014F; Thu, 25 Aug 2022 11:01:04 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Aug 2022 10:59:52 +0200 Message-Id: <20220825085956.4790-2-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220825085956.4790-1-anton@khirnov.net> References: <20220825085956.4790-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/6] fftools/ffmpeg_filter: remove an always-false check 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: XzzYd/6PGsh9 This code cannot be triggered, since after 90944ee3ab7 opening the output file will abort if an encoder cannot be found and streamcopy was not explicitly requested. --- fftools/ffmpeg_filter.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 16622e49c1..4e2787eba2 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -1095,14 +1095,6 @@ int configure_filtergraph(FilterGraph *fg) for (i = 0; i < fg->nb_outputs; i++) { OutputStream *ost = fg->outputs[i]->ost; - if (!ost->enc) { - /* identical to the same check in ffmpeg.c, needed because - complex filter graphs are initialized earlier */ - av_log(NULL, AV_LOG_ERROR, "Encoder (codec %s) not found for output stream #%d:%d\n", - avcodec_get_name(ost->st->codecpar->codec_id), ost->file_index, ost->index); - ret = AVERROR(EINVAL); - goto fail; - } if (ost->enc->type == AVMEDIA_TYPE_AUDIO && !(ost->enc->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE)) av_buffersink_set_frame_size(ost->filter->filter,