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 20C3344A40 for ; Tue, 4 Oct 2022 14:40:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 637D968BC46; Tue, 4 Oct 2022 17:40:45 +0300 (EEST) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0DC1868BBEF for ; Tue, 4 Oct 2022 17:40:39 +0300 (EEST) Received: by mail-ed1-f47.google.com with SMTP id m3so19111122eda.12 for ; Tue, 04 Oct 2022 07:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=cKAAtGKv0iyU6ZBQFvY0hNjX5UHIut7OSeVMind5Mo4=; b=p7oDzAd/juTFpMLH1A03HylgG59Mj/yOlCnzq+UuOa1bTeZIpHdKcBGjGkM+DSP8Qp ZKDtgpn+dFTvKNhG3Ow5v2+o98+FM8Qem83qzKASltch2cD+WQ+MXlKi5UQj43R5JYKJ wWESgrgt6liDUfdqvUc4zBj21ynU4Eyju79p5kM3RNhZCuqXos2ZPKYKOmQSZhEDRmAw DFdF6aUgCuMmZl+Q5r+iMEHSNhi9PANFHpxA7vfQbN8z2qeyl2ogzfU5pyUs3fBCDkVu 8qeClnYmOMB+/nggzwxObmn4nn1fZEJoMLzOWRJBVgXC8FURk/5GOU+TFm9RMc3yYnlh xAOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=cKAAtGKv0iyU6ZBQFvY0hNjX5UHIut7OSeVMind5Mo4=; b=scDnbGRO9fcs23Cpn4ICKBbuScQUemyILE7i+fOR8Zs0Xd4au5uUPlRu004MJpMp1w U8aJUiK/v2xAgyknsJA6ZpkEpucZVZb73y5gGoZmWvDD/0z0+Q0WCPFlKUzdKhjQD8IM Q8bc53R3zNfv0B1n3INIy/bX150QJ4zKPyh2M0xm3pkKwlVggbHGsOKtGT1YbST2JAwX iRC92EnKV3+KBhSmIeeclnVuDJ4t+rz95CG4ablc3a2OT/6792naZZbUGcjYT+QFXH8o wwelnR7w+hrABzn4hZtooCv4NrYKQN1GFInseE30ZY69CEtBPADG0xJpOXO56Z6UV1iD RryA== X-Gm-Message-State: ACrzQf2r+facRRmXjHaSEEBfXtyvdiR9q31G7mOp4zT9KhMMu0fqwWeu ZXZTG1iyTHIMqIUBEjWeyQIslXx3G+ZAug== X-Google-Smtp-Source: AMsMyM7JoX68J1NldEiuInTyPzPsOMBxPZBl+5NCmREdGkG3YpQnaPbSv/Y0Ikv/CfYylUEkBbWnww== X-Received: by 2002:a05:6402:5409:b0:44f:1e05:1e8 with SMTP id ev9-20020a056402540900b0044f1e0501e8mr24043923edb.373.1664894438244; Tue, 04 Oct 2022 07:40:38 -0700 (PDT) Received: from localhost.localdomain (84-112-104-25.cable.dynamic.surfer.at. [84.112.104.25]) by smtp.gmail.com with ESMTPSA id y21-20020a1709064b1500b00722e50dab2csm7190554eju.109.2022.10.04.07.40.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 07:40:37 -0700 (PDT) From: Marvin Scholz To: ffmpeg-devel@ffmpeg.org Date: Tue, 4 Oct 2022 16:40:08 +0200 Message-Id: <20221004144008.89188-3-epirat07@gmail.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20221004144008.89188-1-epirat07@gmail.com> References: <20221004144008.89188-1-epirat07@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] fftools/ffmpeg_opt: Use av_err2str 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: Marvin Scholz 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: This simplifies the code as there is no other place the error buffer is needed, so the av_err2str helper macro can be used. --- fftools/ffmpeg_opt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 8f57b699f1..272a772283 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -3716,7 +3716,6 @@ static int open_files(OptionGroupList *l, const char *inout, int ffmpeg_parse_options(int argc, char **argv) { OptionParseContext octx; - uint8_t error[128]; int ret; memset(&octx, 0, sizeof(octx)); @@ -3767,8 +3766,7 @@ int ffmpeg_parse_options(int argc, char **argv) fail: uninit_parse_context(&octx); if (ret < 0) { - av_strerror(ret, error, sizeof(error)); - av_log(NULL, AV_LOG_FATAL, "%s\n", error); + av_log(NULL, AV_LOG_FATAL, "%s\n", av_err2str(ret)); } return ret; } -- 2.37.0 (Apple Git-136) _______________________________________________ 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".