changeset 15452:de27bb6ff3ec

make file:// prefix work
author nicodvb
date Sat, 14 May 2005 08:15:37 +0000
parents bad4378c5456
children d7a2ffc6e694
files libmpdemux/open.c libmpdemux/stream_file.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/open.c	Sat May 14 07:52:47 2005 +0000
+++ b/libmpdemux/open.c	Sat May 14 08:15:37 2005 +0000
@@ -497,6 +497,7 @@
     strncmp("vcd://", filename, 6) && strncmp("dvb://", filename, 6) &&
     strncmp("cdda://", filename, 7) && strncmp("cddb://", filename, 7) &&
     strncmp("mpst://", filename, 7) && strncmp("tivo://", filename, 7) &&
+    strncmp("file://", filename, 7) && 
     strstr(filename, "://")) {
      url = url_new(filename);
     }
--- a/libmpdemux/stream_file.c	Sat May 14 07:52:47 2005 +0000
+++ b/libmpdemux/stream_file.c	Sat May 14 08:15:37 2005 +0000
@@ -14,14 +14,16 @@
 
 static struct stream_priv_s {
   char* filename;
+  char* dummy_hostname;
 } stream_priv_dflts = {
-  NULL
+  NULL, NULL
 };
 
 #define ST_OFF(f) M_ST_OFF(struct stream_priv_s,f)
 /// URL definition
 static m_option_t stream_opts_fields[] = {
   {"filename", ST_OFF(filename), CONF_TYPE_STRING, 0, 0 ,0, NULL},
+  {"hostname", ST_OFF(dummy_hostname), CONF_TYPE_STRING, 0, 0, 0, NULL },
   { NULL, NULL, 0, 0, 0, 0,  NULL }
 };
 static struct m_struct_st stream_opts = {