mirror of
https://github.com/mpv-player/mpv
synced 2025-02-19 22:36:55 +00:00
When you called mplayer with the absolute path to the video and the VOBSUB
subtitle is in a rar archive, mplayer tried to find the files in the archive with the absolute path. The patch fixes the problem by getting rid of the full path just trying the filename. patch by Uwe.Reder@3SOFT.de git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8204 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
305d04d563
commit
28538fd920
8
vobsub.c
8
vobsub.c
@ -82,7 +82,13 @@ rar_open(const char *const filename, const char *const mode)
|
||||
strcpy(rar_filename, filename);
|
||||
strcat(rar_filename, ".rar");
|
||||
}
|
||||
rc = urarlib_get(&stream->data, &stream->size, (char*) filename, rar_filename, "");
|
||||
/* get rid of the path if there is any */
|
||||
if ((p = strrchr(filename, '/')) == NULL) {
|
||||
p = filename;
|
||||
} else {
|
||||
p++;
|
||||
}
|
||||
rc = urarlib_get(&stream->data, &stream->size, (char*) p, rar_filename, "");
|
||||
free(rar_filename);
|
||||
if (!rc) {
|
||||
free(stream);
|
||||
|
Loading…
Reference in New Issue
Block a user