diff options
Diffstat (limited to 'xine_input_vdr.c')
-rw-r--r-- | xine_input_vdr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xine_input_vdr.c b/xine_input_vdr.c index 3e7a0e02..6e57d7ad 100644 --- a/xine_input_vdr.c +++ b/xine_input_vdr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_input_vdr.c,v 1.105 2008-01-03 15:33:40 phintuka Exp $ + * $Id: xine_input_vdr.c,v 1.106 2008-01-03 19:05:07 phintuka Exp $ * */ @@ -2772,6 +2772,7 @@ static int handle_control_playfile(vdr_input_plugin_t *this, const char *cmd) strn0cpy(filename, pt, sizeof(filename)); if(*filename) { + int is_file_mrl = !strncmp(filename, "file:/", 6) ? 5 : 0; this->loop_play = 0; if(this->slave_stream) @@ -2781,11 +2782,11 @@ static int handle_control_playfile(vdr_input_plugin_t *this, const char *cmd) loop, pos, av, filename); /* check if it is really a file (not mrl) and try to access it */ - if(filename[0] == '/') { + if(is_file_mrl || filename[0] == '/') { struct stat st; char *f = unescape_filename(filename); errno = 0; - if(stat(f, &st)) { + if(stat(f+is_file_mrl, &st)) { if(errno == EACCES || errno == ELOOP) LOGERR("Can't access file !"); if(errno == ENOENT || errno == ENOTDIR) @@ -2800,7 +2801,7 @@ static int handle_control_playfile(vdr_input_plugin_t *this, const char *cmd) if(sub) *sub = 0; snprintf(mrlbase, sizeof(mrlbase), "http://%s:%d/PLAYFILE", host?:"127.0.0.1", iport); - sprintf(mrl, "%s%s", mrlbase, filename); + sprintf(mrl, "%s%s", mrlbase, filename + is_file_mrl); if(sub) { sub += 10; /*strlen("#subtitle:");*/ strcat(mrl, "#subtitle:"); |