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.
This commit is contained in:
Sebastian Dröge 2008-03-23 13:41:28 +00:00
parent 84c8a873f9
commit fb3216d720
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2008-03-23 Sebastian Dröge <slomo@circular-chaos.org>
* 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 <tim at centricular dot net> 2008-03-23 Tim-Philipp Müller <tim at centricular dot net>
* tests/check/elements/gdpdepay.c: * tests/check/elements/gdpdepay.c:

View file

@ -99,7 +99,7 @@ gst_gio_get_supported_protocols (void)
const gchar *const *schemes; const gchar *const *schemes;
gchar **our_schemes; gchar **our_schemes;
guint num; guint num;
gint i; gint i, j;
schemes = g_vfs_get_supported_uri_schemes (g_vfs_get_default ()); schemes = g_vfs_get_supported_uri_schemes (g_vfs_get_default ());
num = g_strv_length ((gchar **) schemes); 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. /* Filter http/https as we can't support the icy stuff with GIO.
* Use souphttpsrc if you need that! * 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) if (strcmp (schemes[i], "http") == 0 || strcmp (schemes[i], "https") == 0)
continue; continue;
our_schemes[i] = g_strdup (schemes[i]); our_schemes[j] = g_strdup (schemes[i]);
j++;
} }
return our_schemes; return our_schemes;