diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-16 03:04:33 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-16 03:04:33 +0000 |
commit | 28538fd920dc95368b1f76fd6ac2902c403ee686 (patch) | |
tree | 9c2205621e6dafee180a249872751b763a5cc07a | |
parent | 305d04d563a3f70fdf8159c3800e502d0834ef65 (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.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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); |