From patchwork Sun Sep 8 18:53:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51437 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1401122vqu; Sun, 8 Sep 2024 20:44:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUpJC/cCeGSZKEMBWdTF/pKy+GEocbfiepDa3ijcEfDgAb2FQDC0oVhtgfocB5bXJcPPWwuCcMQqJMEulytzpmT@gmail.com X-Google-Smtp-Source: AGHT+IEl/WnNXMkCJjto5Df427e5vZuscfw5UWoS7RqVJ7ISh99paDE2sxPPIS7bFr1nYS+agYnU X-Received: by 2002:a17:907:3e12:b0:a8d:2623:cd49 with SMTP id a640c23a62f3a-a8d2623d223mr187625766b.11.1725853450767; Sun, 08 Sep 2024 20:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725853450; cv=none; d=google.com; s=arc-20240605; b=TYTGjzmFabYjq2hTcwDggH4bZZetmSlGeJ2uXOdAOgkYMbbJhmSb6l+37fYncW3pdv tYjIt7N7ThiN0imDDRu4AjzTXp3udYQUdCutixLUYOlhILuWwYYve7i0rFjc4rwAFlZS XS82W/+yYaJ5z+iiB2KoJBZQfMi6f1N2WE5vwTepmScfHhyA1UUntnF6gGefndB7Ph6n NaaWO9+kqIiRf1fZzhHAsZ7pOza2TUP84+ik4DnjrM1d/wuogMh3en9sWS4FpsnQZ9xK VPgeNked2t73iBOMf1xfndUUXrRTwbwgWQEhKgFd/pmjht/brkpRwRupxXJOBFk4lQnp 44dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=D5hrz1/6f5yn5PLV5KjNJAhUKVd3GPRpheM2B2XqOWI=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=MSK62aSwHx1SVFLax3yH0waxqu4vcRd54w22cKVt8oG0Q21W/hMzkixSDro50z2oZu Omrgp+Ua6xoWIBmhTbAE1lltplU9kG35kEChLgzOKIbjmR0AoNa262e0atMf8+iaRcc6 gehO1e/kXH1ZWAJtG8FXX9yOTkUuUdSl9HQelH/vkg4phohGfatgdCFuQfs8WgJfT5jh 85YkUvJOU4AN7NZOiN4jEDJCTmWekqDmdl2/pXSX6Sfxofu/lrvGSA4C3RtYvuFEMM5t lgjyQ39EZ0s+QXwJ+12Nuj/JuvS5nwx8U57F1vjSsSWSNXvInvqMfRrWuAfRqinG9tPv 9Bvw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=idhc2Uri; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25950a67si324286766b.219.2024.09.08.20.44.10; Sun, 08 Sep 2024 20:44:10 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=idhc2Uri; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A982B68DBAE; Mon, 9 Sep 2024 03:55:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AB9EC68DA58 for ; Mon, 9 Sep 2024 03:55:13 +0300 (EEST) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-42c94eb9822so32064465e9.0 for ; Sun, 08 Sep 2024 17:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843313; x=1726448113; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=7uQWgCL2BvGZNqklZi7WXtHjNy5JFjrJkPn6Hqk3HIQ=; b=idhc2UrijBU9s9cV5bfsYOEtlVKARSs1AKqKD2FTu0P7cfeqoQOElVnoeLuTP0m7+y HJkTVBHhAxzQ6GlK1VxRbeWNmmBmd9DNeQoYza+nj8qelb352kDim2xZPpJLo9ILIP3W lzSK6giNRnmQ3JC41bZMJWUvTCiN/7Sf0snuLdK9EaTUVvAIVhh0J6mQsXQoN8nUl9gC 6c0Z2n0rL1HPYDdAJywKawirpoYgMB0CN9iC+K5tLGwNLDdpqIz/lwS0ZrmuuObhebDr 4GtMzJVV/f75viwiVu3CUAN8+iJhVMupUmS4/1lrYF/2q3T1sp1TPrO/6gAUjdF/ud+U L9cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843313; x=1726448113; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7uQWgCL2BvGZNqklZi7WXtHjNy5JFjrJkPn6Hqk3HIQ=; b=AgHgG3zQgZIUVDTIYUQdk7u7dDu7sCRum4u94VXm0zmRVAjoRejZYlEE2HSds1X929 gsiZH0DpbHu30N759K+toYEn1sjXaURPmPyFf+PPZ/EI+ESg4pBnxsJ0OcjNP8S3PMQL GAoKkhjavYv0PfbHN23qhcqS3p1hmRaFJUWXI6Vz6HyrKdML4LKQM/BrGoHwdbRLD1jP WmNiCxOKZ2EmbkuGrhRNQZaIU1fq6JX7Oh0LBb4XPfs+gv7l9OeYQ3FRESZf17TXJyHv RrhRWsmm1gByDD3v71Ddlg/FltnINgpq9RaMzmg+XwQWlI9GzOEgMAi45Ck3W93hMFpn AUsQ== X-Gm-Message-State: AOJu0YwCE14ssytnHi6iK0gkgj6zyYbPbKz6etKOEc6W9OSAzRlP9tBu dCVVGPZGhSxTppEQvofIyIgpLndoU7losB62+MYVCdOPgRxzGH3nwVEfzg== X-Received: by 2002:a05:6000:4581:b0:371:9377:975f with SMTP id ffacd0b85a97d-378895d4740mr5653510f8f.25.1725843312925; Sun, 08 Sep 2024 17:55:12 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:12 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 20:53:11 +0200 Subject: [FFmpeg-devel] [PATCH 13/60] lavfi/f_metadata: use av_err2str to simplify code 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 9X0z537F8bUX No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used. --- libavfilter/f_metadata.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index 1a72284790..abdfb1802b 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -276,10 +276,8 @@ static av_cold int init(AVFilterContext *ctx) } if (ret < 0) { - char buf[128]; - av_strerror(ret, buf, sizeof(buf)); av_log(ctx, AV_LOG_ERROR, "Could not open %s: %s\n", - s->file_str, buf); + s->file_str, av_err2str(ret)); return ret; }