summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-09 15:26:47 +0200
committerwm4 <wm4@nowhere>2015-05-09 15:26:47 +0200
commit04c02796bd371e65f81a92b853658b8fbadb7ad5 (patch)
tree75b09115e17eedbf06cb3233eb145a5c19f72b58 /sub
parent40997b8ae5b4065b3e71d4369eaba14c991e5027 (diff)
downloadmpv-04c02796bd371e65f81a92b853658b8fbadb7ad5.tar.bz2
mpv-04c02796bd371e65f81a92b853658b8fbadb7ad5.tar.xz
path: make mp_path_join accept normal C strings
Instead of bstr. Most callers of this function do not need bstr. The bstr version of this function is now mp_path_join_bstr().
Diffstat (limited to 'sub')
-rw-r--r--sub/find_subfiles.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sub/find_subfiles.c b/sub/find_subfiles.c
index 10dd479a07..bdeef0fadc 100644
--- a/sub/find_subfiles.c
+++ b/sub/find_subfiles.c
@@ -188,7 +188,7 @@ static void append_dir_subtitles(struct mpv_global *global,
if (prio) {
prio += prio;
- char *subpath = mp_path_join(*slist, path, dename);
+ char *subpath = mp_path_join_bstr(*slist, path, dename);
if (mp_path_exists(subpath)) {
MP_GROW_ARRAY(*slist, *nsub);
struct subfn *sub = *slist + (*nsub)++;
@@ -256,8 +256,8 @@ struct subfn *find_external_files(struct mpv_global *global, const char *fname)
// Load subtitles in dirs specified by sub-paths option
if (opts->sub_paths) {
for (int i = 0; opts->sub_paths[i]; i++) {
- char *path = mp_path_join(slist, mp_dirname(fname),
- bstr0(opts->sub_paths[i]));
+ char *path = mp_path_join_bstr(slist, mp_dirname(fname),
+ bstr0(opts->sub_paths[i]));
append_dir_subtitles(global, &slist, &n, bstr0(path), fname, 0);
}
}