From patchwork Tue Jul 27 14:48:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 29069 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a11:4023:0:0:0:0 with SMTP id ky35csp4920186pxb; Tue, 27 Jul 2021 07:49:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYMN0WrBcT6ooyTl7F9vqRP/o923tRR4v3Su1JBo75584+kNmOuz+LR9Pm291hu4Q8f9db X-Received: by 2002:a17:907:3e02:: with SMTP id hp2mr22063400ejc.4.1627397379857; Tue, 27 Jul 2021 07:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627397379; cv=none; d=google.com; s=arc-20160816; b=PQjp+EpTBBXfwHLgSHWErB7qTqrtomPeF9acn7yi50OCjGORp+4qx+8/jdXSDRZoSr iOXQ+11jl9yxnKriGsb0FsTeCxbyJXialKSBwXUWJZpllalBKFN+3qWJp7D6WEi/7Qms rUPijjPsTBMODS24VzzoXxVBN6fhTOR5wTkXDZaXYAQsWMx1vzrkaIzg/o/0nDVFNWuM e5F3WHuQHoog0grqqo73QfbnXW1yf9zJi/wpMagdcpyfPuRlld0MqWcmJ5/ATDRyPkXY RyDsyPvU1hz6gzt34ZHDA26IW0IL5NeX9hxcKBgImctRiMVw8RmjJYXNTfVOKScN/325 a4Ag== 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=e6qQur9x4NTW7cdy1sSyufx9jm54EttzGsSvzby0ZBI=; b=jwrgPo6mh1ydh+m2sFA/YKJ83JK6vLE3yb9Q2jbkFsDp7KwsxACc6qEJbsDJNcTelg QFG/dIO4a6QLjwrcHae8kM396uAhgmVtaeylAzs1Lay08KRcp7GlnK6oipjMhTxrSa3X Js/STdchQyNzfY6eSLrFMV+chMhGAmA8+iZecbWd3vaafkNEGeF+zM/9UvgbRLObE8aB vGVBjP30vVeUuZxtrhfBVxxka4scMi0w95gV859r69/2dVqAy79KLJycFJnsJPXi5umr +9VS5WmwSNJ0i1gUiKWbXYwkg/kWG5w4fhnBzd72mpZI92lQAj/9mY7azeGzh3AdQSe9 hcJQ== 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 j2si3128094edr.294.2021.07.27.07.49.39; Tue, 27 Jul 2021 07:49:39 -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 AD37668A12D; Tue, 27 Jul 2021 17:48:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6EA0468A0B2 for ; Tue, 27 Jul 2021 17:48:23 +0300 (EEST) X-ENS-nef-client: 129.199.129.80 ( name = phare.normalesup.org ) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id 16REmJBr026222 for ; Tue, 27 Jul 2021 16:48:20 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id B66BAE0027; Tue, 27 Jul 2021 16:48:19 +0200 (CEST) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Tue, 27 Jul 2021 16:48:09 +0200 Message-Id: <20210727144813.452917-7-george@nsup.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210727144813.452917-1-george@nsup.org> References: <20210727144813.452917-1-george@nsup.org> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Tue, 27 Jul 2021 16:48:23 +0200 (CEST) Subject: [FFmpeg-devel] [PATCH 06/10] fftools/ffmpeg_opt: treat fs: the same way as file:. 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: 9n16O+q3JDmL Signed-off-by: Nicolas George --- fftools/ffmpeg_opt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 1b43bab9fc..23b4e981c7 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1004,7 +1004,9 @@ static void assert_file_overwrite(const char *filename) } if (!file_overwrite) { - if (proto_name && !strcmp(proto_name, "file") && avio_check(filename, 0) == 0) { + if (proto_name && + !(strcmp(proto_name, "file") && strcmp(proto_name, "fs")) && + avio_check(filename, 0) == 0) { if (stdin_interaction && !no_file_overwrite) { fprintf(stderr,"File '%s' already exists. Overwrite? [y/N] ", filename); fflush(stderr); @@ -1023,7 +1025,7 @@ static void assert_file_overwrite(const char *filename) } } - if (proto_name && !strcmp(proto_name, "file")) { + if (proto_name && !(strcmp(proto_name, "file") && strcmp(proto_name, "fs"))) { for (int i = 0; i < nb_input_files; i++) { InputFile *file = input_files[i]; if (file->ctx->iformat->flags & AVFMT_NOFILE)