summaryrefslogtreecommitdiffstats
path: root/player/scripting.c
diff options
context:
space:
mode:
authorHoyon Mak <hoyon.mak@gmail.com>2017-06-09 18:03:39 +0100
committerwm4 <wm4@nowhere>2017-06-09 19:42:12 +0200
commitb2f756c80e71fb9ceb4fbd94f445ebbbff82703f (patch)
treeba3765af92627185cd6d1b03070d50b39fe64844 /player/scripting.c
parentd8a3b10f45eb10fb34ce9da3a9a76e3bd8644e3d (diff)
downloadmpv-b2f756c80e71fb9ceb4fbd94f445ebbbff82703f.tar.bz2
mpv-b2f756c80e71fb9ceb4fbd94f445ebbbff82703f.tar.xz
scripting: expand --script filename for C plugins
Diffstat (limited to 'player/scripting.c')
-rw-r--r--player/scripting.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/player/scripting.c b/player/scripting.c
index 092404231d..46379b4151 100644
--- a/player/scripting.c
+++ b/player/scripting.c
@@ -215,8 +215,11 @@ void mp_load_scripts(struct MPContext *mpctx)
// Load scripts from options
char **files = mpctx->opts->script_files;
for (int n = 0; files && files[n]; n++) {
- if (files[n][0])
- mp_load_script(mpctx, files[n]);
+ if (files[n][0]) {
+ char *path = mp_get_user_path(NULL, mpctx->global, files[n]);
+ mp_load_script(mpctx, path);
+ talloc_free(path);
+ }
}
if (!mpctx->opts->auto_load_scripts)
return;