diff options
author | Hoyon Mak <hoyon.mak@gmail.com> | 2017-06-09 18:03:39 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-06-09 19:42:12 +0200 |
commit | b2f756c80e71fb9ceb4fbd94f445ebbbff82703f (patch) | |
tree | ba3765af92627185cd6d1b03070d50b39fe64844 /player/lua.c | |
parent | d8a3b10f45eb10fb34ce9da3a9a76e3bd8644e3d (diff) | |
download | mpv-b2f756c80e71fb9ceb4fbd94f445ebbbff82703f.tar.bz2 mpv-b2f756c80e71fb9ceb4fbd94f445ebbbff82703f.tar.xz |
scripting: expand --script filename for C plugins
Diffstat (limited to 'player/lua.c')
-rw-r--r-- | player/lua.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/player/lua.c b/player/lua.c index 35f07ef663..b3e4fe8317 100644 --- a/player/lua.c +++ b/player/lua.c @@ -190,10 +190,8 @@ static void add_functions(struct script_ctx *ctx); static void load_file(lua_State *L, const char *fname) { struct script_ctx *ctx = get_ctx(L); - char *res_name = mp_get_user_path(NULL, ctx->mpctx->global, fname); - MP_VERBOSE(ctx, "loading file %s\n", res_name); - int r = luaL_loadfile(L, res_name); - talloc_free(res_name); // careful to not leak this on Lua errors + MP_VERBOSE(ctx, "loading file %s\n", fname); + int r = luaL_loadfile(L, fname); if (r) lua_error(L); lua_call(L, 0, 0); |