Skip to content

Commit

Permalink
Fix randomly broken mlt_repository with relocatable flag (#1031)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-b-m authored Sep 28, 2024
1 parent 63953cf commit c6dc282
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/framework/mlt_factory.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ mlt_repository mlt_factory_init(const char *directory)
#ifdef __APPLE__
_NSGetExecutablePath(path, &size);
#else
readlink("/proc/self/exe", path, size);
ssize_t len = readlink("/proc/self/exe", path, size - 1);
if (len != -1) {
path[len] = '\0';
}
#endif
char *appdir = mlt_dirname(mlt_dirname(strdup(path)));
mlt_properties_set(global_properties, "MLT_APPDIR", appdir);
Expand Down

0 comments on commit c6dc282

Please sign in to comment.