From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id A851145CEA for ; Wed, 2 Aug 2023 05:28:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1ECBA68C531; Wed, 2 Aug 2023 08:28:40 +0300 (EEST) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0D9EF68B076 for ; Wed, 2 Aug 2023 08:28:32 +0300 (EEST) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-98377c5d53eso886216366b.0 for ; Tue, 01 Aug 2023 22:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690954110; x=1691558910; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=+Gb1iXQJnUEDcB2i6kr2CWOg5k+12OyfzWUN7RF1KQk=; b=CPG5q3J0tDF7HPGRQ42HNBzyX7HEoppJIMnQjDotORIrU+bBQg65RUawATXCLO+GgP ALCoksCTPo1Wm5HSOmAtjk4BHO+l685kDsv1FNNO2SgRIEA4QLKmGVcBx7O+WHOS3MHY 42IoM4tT2iFlb5E8pVrzS8bjkW/nMGhJb2zcFtbW1aMLykmb88KH2SC6Tjtcv/8FSbJr Z2El05UhsAtL7nUiwBsZvEoZAxuPHXT5X9Z58iA4USuegrhRVALakNEh9ohBkbXLgt3L Shx8FxBT8EVfcSZqPGg0V/joxbjXm+wtll/BMIL4RNdn6TuLjTdnG7v8Ldt3CdE+R11e Acmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690954110; x=1691558910; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=+Gb1iXQJnUEDcB2i6kr2CWOg5k+12OyfzWUN7RF1KQk=; b=jByj0BQ7zyqEn0qGu8b/1MBTYL3CeYsOVRvZrFXjifbY+nNbC93bjrlELVbfBwA4+t Kq602aZP0dnrp5TrGz7cZxDUSyzxqiZaWSQYuQBWJuRHh91RbXe0YmQ9FY63V04gyRSX xyo8Ahk/FsTSlAjgkbey9ChcIlKEiGjR2Y1SaSLKNV7HXFvtVOoD9ZCjw8tZg6WnO3nj qZgogXHPjSgW5ZnQgL+CNT9N4pZS0SS85vUz7gktaSNnsDasiMLV82f8twl9cd1gR+mN ric34xHrMWMjPlKzWluxZsbT9QMU7ufBwDNZg4tS7OM30pGWK9Hb/LzmFxn+M3Vvb3x/ ym/A== X-Gm-Message-State: ABy/qLY60a2TVYPw9hJBk5EtkW/NTri4/TTFBb3OjZk5ve/+eaD0xtZh +VGhXL/nVplw/FcHRzoDb4XYHWAdAy4= X-Google-Smtp-Source: APBJJlGNCWms8IbCphNi/B+bMArvBhE/y/P4c3vc13OChgGv/3udh3Be0nWMkGxygQ4ZRDeN3c/1FQ== X-Received: by 2002:a17:906:51cc:b0:993:f540:5bb1 with SMTP id v12-20020a17090651cc00b00993f5405bb1mr3780288ejk.41.1690954110112; Tue, 01 Aug 2023 22:28:30 -0700 (PDT) Received: from mariano ([82.84.192.32]) by smtp.gmail.com with ESMTPSA id oq26-20020a170906cc9a00b009888aa1da11sm8548309ejb.188.2023.08.01.22.28.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Aug 2023 22:28:29 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id 47E42BFB73; Wed, 2 Aug 2023 07:28:29 +0200 (CEST) Date: Wed, 2 Aug 2023 07:28:29 +0200 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: <20230802052829.GE10927@mariano> Mail-Followup-To: FFmpeg development discussions and patches References: <20230715104611.17902-1-anton@khirnov.net> <20230715104611.17902-45-anton@khirnov.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230715104611.17902-45-anton@khirnov.net> User-Agent: Mutt/1.13.2 (2019-12-18) Subject: Re: [FFmpeg-devel] [PATCH 45/47] fftools/ffprobe: inline opt_output_file() into its only caller 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On date Saturday 2023-07-15 12:46:09 +0200, Anton Khirnov wrote: > There is no reason to keep them separate. > > Also, replace exit_program() with returning an error code. > --- > fftools/ffprobe.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > index 6180a5c952..e234c92904 100644 > --- a/fftools/ffprobe.c > +++ b/fftools/ffprobe.c > @@ -3795,22 +3795,18 @@ static int opt_input_file_i(void *optctx, const char *opt, const char *arg) > return 0; > } > > -static void opt_output_file(void *optctx, const char *arg) > +static int opt_output_file_o(void *optctx, const char *opt, const char *arg) > { > if (output_filename) { > av_log(NULL, AV_LOG_ERROR, > "Argument '%s' provided as output filename, but '%s' was already specified.\n", > arg, output_filename); > - exit_program(1); > + return AVERROR(EINVAL); > } > if (!strcmp(arg, "-")) > arg = "fd:"; > output_filename = arg; > -} > > -static int opt_output_file_o(void *optctx, const char *opt, const char *arg) > -{ > - opt_output_file(optctx, arg); > return 0; > } > LGTM. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".