changeset 8203:3af4919d9c5f

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
author arpi
date Sat, 16 Nov 2002 03:04:33 +0000
parents a90ecaca3989
children f2b86274b9d8
files vobsub.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vobsub.c	Sat Nov 16 03:02:23 2002 +0000
+++ b/vobsub.c	Sat Nov 16 03:04:33 2002 +0000
@@ -82,7 +82,13 @@
 	    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);