[Mplayer-cvslog] CVS: main vobsub.c,1.23,1.24
Arpi of Ize
arpi at mplayerhq.hu
Sat Nov 16 04:04:36 CET 2002
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv24244
Modified Files:
vobsub.c
Log Message:
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 at 3SOFT.de
Index: vobsub.c
===================================================================
RCS file: /cvsroot/mplayer/main/vobsub.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- vobsub.c 1 Nov 2002 17:46:41 -0000 1.23
+++ vobsub.c 16 Nov 2002 03:04:33 -0000 1.24
@@ -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);
More information about the MPlayer-cvslog
mailing list