History

libavfilter/vf_frei0r.c: Use UTF-8 version of getenv()

Nil Admirari committed 4 years ago

Commit 69364a01 parent c381f541 file · +10 −4Browse files

Unified · Split

libavfilter/vf_frei0r.c+10−4
@@ -31,6 +31,7 @@ · 30 unmodified lines
31#include "libavutil/avstring.h"31#include "libavutil/avstring.h"
32#include "libavutil/common.h"32#include "libavutil/common.h"
33#include "libavutil/eval.h"33#include "libavutil/eval.h"
34#include "libavutil/getenv_utf8.h"
34#include "libavutil/imgutils.h"35#include "libavutil/imgutils.h"
35#include "libavutil/internal.h"36#include "libavutil/internal.h"
36#include "libavutil/mathematics.h"37#include "libavutil/mathematics.h"
@@ -204,7 +205,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx, · 167 unmodified lines
204 }205 }
205 206
206 /* see: http://frei0r.dyne.org/codedoc/html/group__pluglocations.html */207 /* see: http://frei0r.dyne.org/codedoc/html/group__pluglocations.html */
207 if ((path = av_strdup(getenv("FREI0R_PATH")))) {208 if (path = getenv_dup("FREI0R_PATH")) {
208#ifdef _WIN32209#ifdef _WIN32
209 const char *separator = ";";210 const char *separator = ";";
210#else211#else
@@ -231,12 +232,17 @@ static av_cold int frei0r_init(AVFilterContext *ctx, · 20 unmodified lines
231 if (ret < 0)232 if (ret < 0)
232 return ret;233 return ret;
233 }234 }
234 if (!s->dl_handle && (path = getenv("HOME"))) {235 if (!s->dl_handle && (path = getenv_utf8("HOME"))) {
235 char *prefix = av_asprintf("%s/.frei0r-1/lib/", path);236 char *prefix = av_asprintf("%s/.frei0r-1/lib/", path);
236 if (!prefix)237 if (!prefix) {
237 return AVERROR(ENOMEM);238 ret = AVERROR(ENOMEM);
239 goto home_path_end;
240 }
238 ret = load_path(ctx, &s->dl_handle, prefix, dl_name);241 ret = load_path(ctx, &s->dl_handle, prefix, dl_name);
239 av_free(prefix);242 av_free(prefix);
243
244 home_path_end:
245 freeenv_utf8(path);
240 if (ret < 0)246 if (ret < 0)
241 return ret;247 return ret;
242 }248 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t