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 EE05C4311C for ; Mon, 20 Jun 2022 10:30:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C16A568B646; Mon, 20 Jun 2022 13:30:26 +0300 (EEST) Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2BFC968B5F8 for ; Mon, 20 Jun 2022 13:30:17 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1655721016; bh=Fswtpdsxc+uCUbW9I20/DTvv/5Wfheg3DtEnriY7PVg=; h=X-EA-Auth:From:To:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=fdKz3um6zmowdbodYAQyus1Qgee5zJclJeuPBqBJNbaovfKa+C+qJjQnFkC/jINhX a5ZpGpPTHZJSPUuP6tzRC4EG9d4BJeXf2sCTZwsm4f2NOu+7k/l10BIBFzO0JMVGNP EYjQVoD9jPQw25Y9uf1jCfGASG3nxxmoEXkSIkng= Received: by b-4.in.mailobj.net [192.168.90.14] with ESMTP via ip-206.mailobj.net [213.182.55.206] Mon, 20 Jun 2022 12:30:16 +0200 (CEST) X-EA-Auth: ttFGATWIcwW+I1F5i0GAJWPl5Aq1CEzm3vXg2YzNU/XkQybs/fkCQ/t1l3h5YE6yhJHU+mM8YeAwuJWsN3gqqVPBGhaL2Xh1qpwGTjfgVgI= From: Nil Admirari To: ffmpeg-devel@ffmpeg.org Date: Mon, 20 Jun 2022 13:30:01 +0300 Message-Id: <20220620103001.15035-5-nil-admirari@mailo.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220620103001.15035-1-nil-admirari@mailo.com> References: <20220620103001.15035-1-nil-admirari@mailo.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v20 5/5] libavfilter/vf_frei0r.c: Use UTF-8 version of getenv() 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: --- libavfilter/vf_frei0r.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index f11ae6e55c..1e01114b76 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -31,6 +31,7 @@ #include "libavutil/avstring.h" #include "libavutil/common.h" #include "libavutil/eval.h" +#include "libavutil/getenv_utf8.h" #include "libavutil/imgutils.h" #include "libavutil/internal.h" #include "libavutil/mathematics.h" @@ -204,7 +205,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx, } /* see: http://frei0r.dyne.org/codedoc/html/group__pluglocations.html */ - if ((path = av_strdup(getenv("FREI0R_PATH")))) { + if (path = getenv_dup("FREI0R_PATH")) { #ifdef _WIN32 const char *separator = ";"; #else @@ -231,12 +232,17 @@ static av_cold int frei0r_init(AVFilterContext *ctx, if (ret < 0) return ret; } - if (!s->dl_handle && (path = getenv("HOME"))) { + if (!s->dl_handle && (path = getenv_utf8("HOME"))) { char *prefix = av_asprintf("%s/.frei0r-1/lib/", path); - if (!prefix) - return AVERROR(ENOMEM); + if (!prefix) { + ret = AVERROR(ENOMEM); + goto home_path_end; + } ret = load_path(ctx, &s->dl_handle, prefix, dl_name); av_free(prefix); + + home_path_end: + freeenv_utf8(path); if (ret < 0) return ret; } -- 2.34.1 _______________________________________________ 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".