diff options
author | Bastien Nocera <hadess@users.sourceforge.net> | 2003-10-07 19:57:48 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@users.sourceforge.net> | 2003-10-07 19:57:48 +0000 |
commit | 2d6c8c89670f941da58cee9aa1e2469c0e2bfb42 (patch) | |
tree | fac2eba62d122497ffbc2f9aac211e75a940a6fa /src | |
parent | f17eac40de3f8121430d63aa3ab2be10030800a4 (diff) | |
download | xine-lib-2d6c8c89670f941da58cee9aa1e2469c0e2bfb42.tar.gz xine-lib-2d6c8c89670f941da58cee9aa1e2469c0e2bfb42.tar.bz2 |
- blacklist more schemes, avoiding warnings
CVS patchset: 5467
CVS date: 2003/10/07 19:57:48
Diffstat (limited to 'src')
-rw-r--r-- | src/input/input_gnome_vfs.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/input/input_gnome_vfs.c b/src/input/input_gnome_vfs.c index af9e8912c..d11eb7c0b 100644 --- a/src/input/input_gnome_vfs.c +++ b/src/input/input_gnome_vfs.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_gnome_vfs.c,v 1.14 2003/08/10 16:03:21 miguelfreitas Exp $ + * $Id: input_gnome_vfs.c,v 1.15 2003/10/07 19:57:48 hadess Exp $ */ @@ -265,6 +265,7 @@ gnomevfs_klass_dispose (input_class_t *this_gen) g_free (this); } +static char * ignore_scheme[] = { "cdda", "http", "file" }; static input_plugin_t * gnomevfs_klass_get_instance (input_class_t *klass_gen, xine_stream_t *stream, @@ -272,26 +273,24 @@ gnomevfs_klass_get_instance (input_class_t *klass_gen, xine_stream_t *stream, { gnomevfs_input_t *this; GnomeVFSURI *uri; + int i; + + if (mrl == NULL) + return NULL; + else if (strstr (mrl, "://") == NULL) + return NULL; D("gnomevfs_klass_get_instance: %s", mrl); + for (i = 0; i < G_N_ELEMENTS (ignore_scheme); i++) { + if (strncmp (ignore_scheme[i], mrl, strlen (ignore_scheme[i])) == 0) + return NULL; + } + uri = gnome_vfs_uri_new (mrl); if (uri == NULL) return NULL; - /* local files should be handled by the file input */ - if (strncmp (mrl, "file:/", strlen ("file:/")) == 0 - || strstr (mrl, "://") == NULL) - { - D("gnomevfs_klass_open: '%s' is a file:///", mrl); - gnome_vfs_uri_unref (uri); - return NULL; - } else if (strncmp (gnome_vfs_uri_get_scheme (uri), "http", 4) == 0) { - D("gnomevfs_klass_open: '%s' is http://", mrl); - gnome_vfs_uri_unref (uri); - return NULL; - } - D("Creating the structure for stream '%s'", mrl); this = g_new0 (gnomevfs_input_t, 1); this->stream = stream; |