mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
vf_frei0r: refactor library loading from env variable
strtok_r is not needed any more, so remove it from configure.
This commit is contained in:
parent
4e0be9c86f
commit
61b323ce7c
6
configure
vendored
6
configure
vendored
@ -1410,7 +1410,6 @@ HAVE_LIST="
|
|||||||
soundcard_h
|
soundcard_h
|
||||||
strerror_r
|
strerror_r
|
||||||
strptime
|
strptime
|
||||||
strtok_r
|
|
||||||
struct_addrinfo
|
struct_addrinfo
|
||||||
struct_group_source_req
|
struct_group_source_req
|
||||||
struct_ip_mreq_source
|
struct_ip_mreq_source
|
||||||
@ -2018,9 +2017,9 @@ boxblur_filter_deps="gpl"
|
|||||||
cropdetect_filter_deps="gpl"
|
cropdetect_filter_deps="gpl"
|
||||||
delogo_filter_deps="gpl"
|
delogo_filter_deps="gpl"
|
||||||
drawtext_filter_deps="libfreetype"
|
drawtext_filter_deps="libfreetype"
|
||||||
frei0r_filter_deps="frei0r dlopen strtok_r"
|
frei0r_filter_deps="frei0r dlopen"
|
||||||
frei0r_filter_extralibs='$ldl'
|
frei0r_filter_extralibs='$ldl'
|
||||||
frei0r_src_filter_deps="frei0r dlopen strtok_r"
|
frei0r_src_filter_deps="frei0r dlopen"
|
||||||
frei0r_src_filter_extralibs='$ldl'
|
frei0r_src_filter_extralibs='$ldl'
|
||||||
hqdn3d_filter_deps="gpl"
|
hqdn3d_filter_deps="gpl"
|
||||||
interlace_filter_deps="gpl"
|
interlace_filter_deps="gpl"
|
||||||
@ -3855,7 +3854,6 @@ check_func_headers malloc.h _aligned_malloc && enable aligned_malloc
|
|||||||
check_func setrlimit
|
check_func setrlimit
|
||||||
check_func strerror_r
|
check_func strerror_r
|
||||||
check_func strptime
|
check_func strptime
|
||||||
check_func strtok_r
|
|
||||||
check_func sched_getaffinity
|
check_func sched_getaffinity
|
||||||
check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)"
|
check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)"
|
||||||
check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()"
|
check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()"
|
||||||
|
@ -232,12 +232,18 @@ static av_cold int frei0r_init(AVFilterContext *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* see: http://piksel.org/frei0r/1.2/spec/1.2/spec/group__pluglocations.html */
|
/* see: http://piksel.org/frei0r/1.2/spec/1.2/spec/group__pluglocations.html */
|
||||||
if ((path = av_strdup(getenv("FREI0R_PATH")))) {
|
if (path = getenv("FREI0R_PATH")) {
|
||||||
char *p, *ptr = NULL;
|
while(*path) {
|
||||||
for (p = path; p = strtok_r(p, ":", &ptr); p = NULL)
|
char *ptr = av_get_token((const char **)&path, ":");
|
||||||
if (s->dl_handle = load_path(ctx, p, dl_name))
|
if (!ptr)
|
||||||
break;
|
return AVERROR(ENOMEM);
|
||||||
av_free(path);
|
s->dl_handle = load_path(ctx, ptr, dl_name);
|
||||||
|
av_freep(&ptr);
|
||||||
|
if (s->dl_handle)
|
||||||
|
break; /* found */
|
||||||
|
if (*path)
|
||||||
|
path++ /* skip ':' */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!s->dl_handle && (path = getenv("HOME"))) {
|
if (!s->dl_handle && (path = getenv("HOME"))) {
|
||||||
char prefix[1024];
|
char prefix[1024];
|
||||||
|
Loading…
Reference in New Issue
Block a user