comparison 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
comparison
equal deleted inserted replaced
8202:a90ecaca3989 8203:3af4919d9c5f
80 return NULL; 80 return NULL;
81 } 81 }
82 strcpy(rar_filename, filename); 82 strcpy(rar_filename, filename);
83 strcat(rar_filename, ".rar"); 83 strcat(rar_filename, ".rar");
84 } 84 }
85 rc = urarlib_get(&stream->data, &stream->size, (char*) filename, rar_filename, ""); 85 /* get rid of the path if there is any */
86 if ((p = strrchr(filename, '/')) == NULL) {
87 p = filename;
88 } else {
89 p++;
90 }
91 rc = urarlib_get(&stream->data, &stream->size, (char*) p, rar_filename, "");
86 free(rar_filename); 92 free(rar_filename);
87 if (!rc) { 93 if (!rc) {
88 free(stream); 94 free(stream);
89 return NULL; 95 return NULL;
90 } 96 }