aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-16 03:04:33 +0000
committerGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-16 03:04:33 +0000
commit28538fd920dc95368b1f76fd6ac2902c403ee686 (patch)
tree9c2205621e6dafee180a249872751b763a5cc07a
parent305d04d563a3f70fdf8159c3800e502d0834ef65 (diff)
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
-rw-r--r--vobsub.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vobsub.c b/vobsub.c
index 1a63ed9c2d..a162229cae 100644
--- a/vobsub.c
+++ b/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);