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 7E8B043EB1 for ; Tue, 16 Aug 2022 23:07:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7535068B900; Wed, 17 Aug 2022 02:07:08 +0300 (EEST) Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3D33268B8EC for ; Wed, 17 Aug 2022 02:07:02 +0300 (EEST) Received: by mail-ed1-f51.google.com with SMTP id a89so15375162edf.5 for ; Tue, 16 Aug 2022 16:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:from:to:cc; bh=yMVeiY0m/YOPADG9Qlk+Hjc4CIPLRZXpKf/q8n6YSy4=; b=ZzEdj+FACQvc589Haw+hbQgASYFRiiQWv87fiiqH6HzcpCJ1QTjadxtcwnTKxzbXOd HFdcj79apffwNGntvJ7oZD/mcptZe75Q6s6bY2ZfWrVx3pfdgRZZH3byzi+i2ZqM8sVA I8dQjp4aC6NPxWReDs+g9MkXy5NF5Ku6vYeY8VPeWPEkFD6kp4ytRyvFyKeTKBSpTzNb wISrBTyYUP0ILAo/3gFmSw0dccokdS2EiK76XOyn88B9AxOaan3dON26jk7mZEh1pf64 y5x/mCoV6keklh8/g+UBwebAi7PI32L8G7wPUBwHRhwl+JBdlYtxM0JwTejkMKlHo/sA 8sGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=yMVeiY0m/YOPADG9Qlk+Hjc4CIPLRZXpKf/q8n6YSy4=; b=GdQYSJ55uqpVjxPOkdares+CitJ7CmO9d9JQ+cX8/mTnMBJJGHI3atHbjpqLhOnrXH Md3WTQESdK2tl5kZPN+nHg4/rbVetWLik66eJ/mq/lL0iLC5UmBOhP1pUNV8fKJSb1V3 3irqYOiwXkoVvstNf9/nVK6mLtBId4FAy3EEt6AIX2tqdxUffQPCV9VzTPudNb+X+BAu 5esw9nrmL9S+PJcekU93KvXM11hYDsd+egvXlpnG2lgNsJc9hsXqWnhc64SqIlMoeIWc JZ4KSdpw3Om6d+2U73oHA0hzWo8nsHIue9+ttB6XZoJYSV56mX2xebspFM7XJDVWLLkA ze7g== X-Gm-Message-State: ACgBeo37gVHTjWzyTTPlxoQKrs+AEajfoKO2z0RH2ThV82QvBm8pZsZU 244EW+UOLiFm3LU13MTPcyyIkK2mBI+Hbg== X-Google-Smtp-Source: AA6agR4FtB2JtCjoXTqGWAZMV1pFtg0hJ0N3WNpJgU1o4QkX7NeU1l4DHgUkXBfjsP/ozO2kx4cqjw== X-Received: by 2002:a05:6402:5193:b0:43e:1d52:fd70 with SMTP id q19-20020a056402519300b0043e1d52fd70mr20642123edd.150.1660691221315; Tue, 16 Aug 2022 16:07:01 -0700 (PDT) Received: from mariano (94-37-135-74.adsl-ull.clienti.tiscali.it. [94.37.135.74]) by smtp.gmail.com with ESMTPSA id cs1-20020a0564020c4100b0043e35ae2610sm9194091edb.27.2022.08.16.16.07.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 16:07:00 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id EF955C071F; Wed, 17 Aug 2022 01:06:58 +0200 (CEST) Date: Wed, 17 Aug 2022 01:06:58 +0200 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: <20220816230658.GA3168@mariano> Mail-Followup-To: FFmpeg development discussions and patches References: <20220815183410.6741-1-ffmpeg@gyani.pro> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220815183410.6741-1-ffmpeg@gyani.pro> User-Agent: Mutt/1.13.2 (2019-12-18) Subject: Re: [FFmpeg-devel] [PATCH] ffprobe: restore reporting error code for failed inputs 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 Tuesday 2022-08-16 00:04:10 +0530, Gyan Doshi wrote: > c11fb46731 led to a regression whereby the return code for missing > input or input probe is overridden by writer close return code and > hence not conveyed in the exit code. > --- > fftools/ffprobe.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > Affects 5.1 so will need to be backported there. > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > index ad633ccc44..8983dc28cc 100644 > --- a/fftools/ffprobe.c > +++ b/fftools/ffprobe.c > @@ -4032,7 +4032,7 @@ int main(int argc, char **argv) > WriterContext *wctx; > char *buf; > char *w_name = NULL, *w_args = NULL; > - int ret, i; > + int ret, input_ret, i; > > init_dynload(); > > @@ -4156,10 +4156,14 @@ int main(int argc, char **argv) > show_error(wctx, ret); > } > > + input_ret = ret; > + > writer_print_section_footer(wctx); > ret = writer_close(&wctx); > if (ret < 0) > av_log(NULL, AV_LOG_ERROR, "Writing output failed: %s\n", av_err2str(ret)); > + > + ret = FFMIN(ret, input_ret); maybe we should give priority to input_ret in case they are both negative? return input_ret < 0 ? input_ret : ret; ? _______________________________________________ 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".