diff vobsub.c @ 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 b9da278e4c92
children bc7bd163fff9
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);