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 BF05441049 for ; Mon, 13 Jun 2022 16:27:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 62DDE68B5F8; Mon, 13 Jun 2022 19:26:49 +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 BCDA468B5B0 for ; Mon, 13 Jun 2022 19:26:40 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1655137599; bh=p9jxFt4rVMw7lLn6uKQfLHnRCrr8GugwXB91pqjkC1Q=; h=X-EA-Auth:From:To:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=O1MwG4a73ahB0V5/eIAvH5TuIAefYTpNw7axDz0559ExklAs9aNg9xMbDfuUi2YHx uk3u2WWUQObEufwKFUVZQS2vZkr1g/SwSvRyl71d0+0ni1AZjmAPbgHufIrTbobyBi hDKiLuQuyotN1cSF7spOPR0tfYboVVsVrd2hX8ZM= Received: by b-1.in.mailobj.net [192.168.90.11] with ESMTP via ip-206.mailobj.net [213.182.55.206] Mon, 13 Jun 2022 18:26:39 +0200 (CEST) X-EA-Auth: XSp3GX+JTWu+98ThkHnz7Tk/JBw2VdzjsiS+QXu/jZXsc8kNdMlf1sZEw46HqUf7+O1b+IzES87S70GrBdQLRVZwlZft/yLoqaR7lxN7iG8= From: Nil Admirari To: ffmpeg-devel@ffmpeg.org Date: Mon, 13 Jun 2022 19:26:26 +0300 Message-Id: <20220613162626.11541-5-nil-admirari@mailo.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220613162626.11541-1-nil-admirari@mailo.com> References: <20220613162626.11541-1-nil-admirari@mailo.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v14 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..727e96561a 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_utf8("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: + av_free(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".