diff options
author | wm4 <wm4@nowhere> | 2020-05-10 16:22:16 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-05-10 16:36:47 +0200 |
commit | 0b09771ba9f5a54fe1c8c8612a04dd7a1f1672c6 (patch) | |
tree | d09f63e41f79bb8c2d6c2f2969bd53d8490ec27d /video/out/gpu | |
parent | caf228b21807423c28e2f5bde0dcd7dc981e3773 (diff) | |
download | mpv-0b09771ba9f5a54fe1c8c8612a04dd7a1f1672c6.tar.bz2 mpv-0b09771ba9f5a54fe1c8c8612a04dd7a1f1672c6.tar.xz |
vo_gpu: manually resolve user shader prefixes
This resolves prefixes such as "~/" and "~~/" at the caller, instead of
relying on stream_read_file() to do it. One of the following commits
will remove this from stream_read_file() itself.
Untested.
Diffstat (limited to 'video/out/gpu')
-rw-r--r-- | video/out/gpu/video.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 22ce0c3f3b..7564c92eb7 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -29,6 +29,7 @@ #include "misc/bstr.h" #include "options/m_config.h" +#include "options/path.h" #include "common/global.h" #include "options/options.h" #include "utils.h" @@ -493,7 +494,9 @@ static struct bstr load_cached_file(struct gl_video *p, const char *path) return p->files[n].body; } // not found -> load it - struct bstr s = stream_read_file(path, p, p->global, 1000000000); // 1GB + char *fname = mp_get_user_path(NULL, p->global, path); + struct bstr s = stream_read_file(fname, p, p->global, 1000000000); // 1GB + talloc_free(fname); if (s.len) { struct cached_file new = { .path = talloc_strdup(p, path), |