From 28538fd920dc95368b1f76fd6ac2902c403ee686 Mon Sep 17 00:00:00 2001 From: arpi Date: Sat, 16 Nov 2002 03:04:33 +0000 Subject: 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 --- vobsub.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'vobsub.c') 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); -- cgit v1.2.3