From fb3216d7206d3332f5ede2c456cd8622bb418dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 23 Mar 2008 13:41:28 +0000 Subject: [PATCH] ext/gio/gstgio.c: Correctly set the supported URI schemes and don't leave some schemes in the middle or at the start ... Original commit message from CVS: * ext/gio/gstgio.c: (gst_gio_get_supported_protocols): Correctly set the supported URI schemes and don't leave some schemes in the middle or at the start at NULL. --- ChangeLog | 6 ++++++ ext/gio/gstgio.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2ab286c60..b01c671ad0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-23 Sebastian Dröge + + * ext/gio/gstgio.c: (gst_gio_get_supported_protocols): + Correctly set the supported URI schemes and don't leave + some schemes in the middle or at the start at NULL. + 2008-03-23 Tim-Philipp Müller * tests/check/elements/gdpdepay.c: diff --git a/ext/gio/gstgio.c b/ext/gio/gstgio.c index 1b48bf2981..47ff85237e 100644 --- a/ext/gio/gstgio.c +++ b/ext/gio/gstgio.c @@ -99,7 +99,7 @@ gst_gio_get_supported_protocols (void) const gchar *const *schemes; gchar **our_schemes; guint num; - gint i; + gint i, j; schemes = g_vfs_get_supported_uri_schemes (g_vfs_get_default ()); num = g_strv_length ((gchar **) schemes); @@ -109,11 +109,12 @@ gst_gio_get_supported_protocols (void) /* Filter http/https as we can't support the icy stuff with GIO. * Use souphttpsrc if you need that! */ - for (i = 0; i < num; i++) { + for (i = 0, j = 0; i < num; i++) { if (strcmp (schemes[i], "http") == 0 || strcmp (schemes[i], "https") == 0) continue; - our_schemes[i] = g_strdup (schemes[i]); + our_schemes[j] = g_strdup (schemes[i]); + j++; } return our_schemes;