From patchwork Mon Jul 15 12:56:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dabrien 'Dabe' Murphy X-Patchwork-Id: 50544 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:2298:b0:482:c625:d099 with SMTP id fp24csp2231212vqb; Mon, 15 Jul 2024 05:56:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWNJh1b45KqhCb+yZv0KhQYicaVG6Lxtt8BWqWHfeoo4F/o1NruxEBrFc90KC5z9k0N0W/f8Ug9y52jLQWvLL7slp6xZpXoesW+ew== X-Google-Smtp-Source: AGHT+IFYGxBxR/P8+OdDwD4QHIZL6dvm6rqFKvbohddH37bjLloORrrFce46RPnVKtGbP+LcS6Nd X-Received: by 2002:a05:6402:4316:b0:57c:a77d:a61e with SMTP id 4fb4d7f45d1cf-594bab80111mr14514360a12.7.1721048196434; Mon, 15 Jul 2024 05:56:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721048196; cv=none; d=google.com; s=arc-20160816; b=zG9815vEXR+vGumeZAsBGw/OD3iaCvMBE6LNjVlNj3hKp4BjqRmFF5TRxcKoWsO/+0 ANojBsTjNrSVblMNZ0MzmhYoiQxOG/LatNL5H48cfJKGtnMmIlD8LYwc0UGkqkjDVjTJ eWxJDNEV/UJ4On6mY5q4LuKC6OR3VA2QBJbhN3lOm7IYfl5FEi/CNliPnza0caLkEkc4 XHXl8AxLRpe/WeMQ9K6OIQl/eFMUpACjP5/fvIGc9onAChpqCB05aBYcOpWsAdKnhfiD 7T0URzx0d4ohZZCNcXNBN4daby6j6Nk6rpxeZV3AzPt97FTb6rUx+E5q/+7rYykn47t9 d2gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:content-language:in-reply-to :mime-version:user-agent:date:message-id:references:to:from :delivered-to; bh=Mt8HjTs5UKxAzPHAW1LWaAxoyyto+WMVjisvTY/0ZLk=; fh=+L25f8i6pkgS5aKn4P0Y8hZjLsWjDmkz2QPjmhoTeWo=; b=cRBD0bpDsf0XLsowdfROCv+ZPc8x6RliK0wI/vt4K0hTr5QUF5o/ilEinAFd1e59Zl 0gmOS/Ke/JvMitGZJdJxdotgrXWp8D7UmlrOvzB/X0aBpZXDYnsLToG8WOL6qa1oykE4 H1o44IjHG6SzkjzHsfDeCXBoioZcpzCcp+tl3djQ2jcuAXIfANuGsS8kuH9dUcOVe5Fj 9M4sMACpjTSy++G4cpqEApioXdtZrYm6KFL255hxoNn1ZXIYnAaTgJbPjAFdYvw9XJui kPlOG0fEPqLpx8GSdG4Bam/hQRKbIlhTr56BObxeEIi1IpmRXkzMsOu9n15t5Gmr6EnZ 86WA==; dara=google.com 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=dabe.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-59b2497808fsi2623770a12.114.2024.07.15.05.56.36; Mon, 15 Jul 2024 05:56: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=dabe.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C39CC68DA2B; Mon, 15 Jul 2024 15:56:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from malbec.omniscient.com (malbec.omniscient.com [38.70.18.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0E72468D8F6 for ; Mon, 15 Jul 2024 15:56:25 +0300 (EEST) Received: from triton.parabon.com (vzw-53.parabon.com [96.255.5.253]) (authenticated bits=0) by malbec.omniscient.com (8.18.1/8.18.1) with ESMTPSA id 46FCuNTt073754 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 15 Jul 2024 08:56:23 -0400 (EDT) (envelope-from dabe@dabe.com) X-Authentication-Warning: malbec.omniscient.com: Host vzw-53.parabon.com [96.255.5.253] claimed to be triton.parabon.com From: "Dabrien 'Dabe' Murphy" To: ffmpeg-devel@ffmpeg.org References: <20240712232334.87395-1-dabe@dabe.com> <20240712232334.87395-2-dabe@dabe.com> Message-ID: Date: Mon, 15 Jul 2024 08:56:22 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:52.0) Gecko/20100101 PostboxApp/7.0.60 MIME-Version: 1.0 In-Reply-To: <20240712232334.87395-2-dabe@dabe.com> Content-Language: en-US X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] [PATCH 1/1] fftools/ffmpeg_opt: Exit with non-zero status when destination exists 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 Cc: Dabrien 'Dabe' Murphy Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8sLLQMaKwqig --- fftools/ffmpeg_opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.45.2 diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 2c201c74b2..dddf7c6475 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -604,13 +604,13 @@ int assert_file_overwrite(const char *filename) signal(SIGINT, SIG_DFL); if (!read_yesno()) { av_log(NULL, AV_LOG_FATAL, "Not overwriting - exiting\n"); - return AVERROR_EXIT; + return AVERROR(EEXIST); } term_init(); } else { av_log(NULL, AV_LOG_FATAL, "File '%s' already exists. Exiting.\n", filename); - return AVERROR_EXIT; + return AVERROR(EEXIST); } } }