From patchwork Mon Nov 14 15:13:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 39273 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp2487755pzb; Mon, 14 Nov 2022 07:14:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf5jINiO5CD+gGndEDg+DeaLgo826wjiQ8oJu2rOFgERndaZEp+tGxPd7D3Rbg6BgktOfy3b X-Received: by 2002:a05:600c:2309:b0:3cf:d0ba:e5ff with SMTP id 9-20020a05600c230900b003cfd0bae5ffmr8205321wmo.36.1668438878637; Mon, 14 Nov 2022 07:14:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668438878; cv=none; d=google.com; s=arc-20160816; b=lJNSavuqoomRBQEnsMymiYTQHFkjqIWtXm5X9gHspnNyD+SFzQDni379Gulw83zZmx sp4sRJDgciPcBeryGMzuD/AuECC6LQccDe5rmdsIZKqvWVm3thkuyXHN/tNXpB9Gi7mo nqg0Fq2LDjoWdzOrPDJjLJsHQNmTELQD//uI6CkutxLtXEGdPNdTtmUQ3MMJnoxthhhC u8bXDbea0Vbtt1wD+yUhqIaCUsSzq3CCIJQfUKnfx5OKd64FeRybFDU6arYGO9USIG5r lLwTPSX7rW0KKEvt+2wDEfpRxUCs2AQoIGUUsGZQU6C/T5roEUzFLaiGhqOIsTju3aw3 448A== 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=X/Cd38KzGJvvQa30z16QH3+7m3RxpkpIzKPzz3c27j0=; b=A8j05U4DrK+TAzfEI15+zPUD3/3CJGyUUI30haMZcuR2KUsKf8OweQ4rUW+Du2j1Mm cCCV+YELfLJQKFNz3sK76JmE0JmPTPswnESHnJ+wsyMB3Q645s4kw2Bq9chcKHSLLeDO wowC8oHaEBHubZH3VQ/+voyGUxqI8zRTMWagMTga3/YzJs+g7WWyo2Q8eg7E0MpAAU/n /dvvKO96hwYgRareJgQNc+mZJaHf6TlZ6ZGyK+Mw6uw86sph2VNByBmr9hruGeXqrpex vkf9yFi2TiGHP0WnEo2q4geyKVa0yLvwXEBil2DHOC9wLLf5nURScjhvxjMfAvoN8RAP TREA== 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 cm25-20020a0564020c9900b004608b4f28b7si7149923edb.106.2022.11.14.07.14.37; Mon, 14 Nov 2022 07:14:38 -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; 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 D584768BE1A; Mon, 14 Nov 2022 17:14:27 +0200 (EET) 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 6949868BE0A for ; Mon, 14 Nov 2022 17:14:20 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 2674F2400F5 for ; Mon, 14 Nov 2022 16:14:20 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id hE6PN2NSjAcL for ; Mon, 14 Nov 2022 16:14:19 +0100 (CET) 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 0F3A72404F7 for ; Mon, 14 Nov 2022 16:14:19 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id E217A3A06E5 for ; Mon, 14 Nov 2022 16:14:18 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 14 Nov 2022 16:13:50 +0100 Message-Id: <20221114151350.5134-8-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221114151350.5134-1-anton@khirnov.net> References: <20221114151350.5134-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 8/8] fftools/ffmpeg_mux_init: drop 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: vCkEiVMiTG/3 It cannot be true since 1959351aecf. Effectively reverts 6a3833e1411. --- fftools/ffmpeg.h | 1 - fftools/ffmpeg_demux.c | 2 -- fftools/ffmpeg_mux_init.c | 6 ------ fftools/ffmpeg_opt.c | 5 ----- 4 files changed, 14 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index b9262b373f..a96ff0d723 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -674,7 +674,6 @@ extern HWDevice *filter_hw_device; extern unsigned nb_output_dumped; extern int main_return_code; -extern int input_stream_potentially_available; extern int ignore_unknown_streams; extern int copy_unknown_streams; diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 94fd604fd9..595a56a590 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -1097,7 +1097,5 @@ int ifile_open(const OptionsContext *o, const char *filename) } } - input_stream_potentially_available = 1; - return 0; } diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 277cbd1f64..db45fa09fa 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -1911,12 +1911,6 @@ int of_open(const OptionsContext *o, const char *filename) } } - if (!(oc->oformat->flags & AVFMT_NOSTREAMS) && !input_stream_potentially_available) { - av_log(NULL, AV_LOG_ERROR, - "No input streams but output needs an input stream\n"); - exit_program(1); - } - if (!(oc->oformat->flags & AVFMT_NOFILE)) { /* test if it already exists to avoid losing precious files */ assert_file_overwrite(filename); diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 5ab296828b..61aa0be0ab 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -95,7 +95,6 @@ static int no_file_overwrite = 0; #if FFMPEG_OPT_PSNR int do_psnr = 0; #endif -int input_stream_potentially_available = 0; int ignore_unknown_streams = 0; int copy_unknown_streams = 0; int recast_media = 0; @@ -1114,8 +1113,6 @@ static int opt_filter_complex(void *optctx, const char *opt, const char *arg) if (!fg->graph_desc) return AVERROR(ENOMEM); - input_stream_potentially_available = 1; - return 0; } @@ -1130,8 +1127,6 @@ static int opt_filter_complex_script(void *optctx, const char *opt, const char * fg->index = nb_filtergraphs - 1; fg->graph_desc = graph_desc; - input_stream_potentially_available = 1; - return 0; }