- Fix uri search function where it would always return the last uriu function even if it was not a correct one.

Original commit message from CVS:
- Fix uri search function where it would always return the last uriu function
even if it was not a correct one.
- small comment cleanup to avoid problems with gtk-doc
This commit is contained in:
Wim Taymans 2003-03-31 20:02:59 +00:00
parent 4b04aa61d9
commit 863e55c70e

View file

@ -138,7 +138,7 @@ gst_uri_handler_find (const gchar *name)
return NULL;
}
/**
/*
* this is a straight copy from glib 2.2
* remove this function when glib 2.2 is sufficiently widespread and
* then change to using the regular g_str_has_prefix
@ -170,23 +170,25 @@ GstURIHandler*
gst_uri_handler_find_by_uri (const gchar *uri)
{
GList *walk, *orig;
GstURIHandler *handler = NULL;
GstURIHandler *result = NULL;
g_return_val_if_fail (uri != NULL, NULL);
orig = walk = gst_registry_pool_feature_list (GST_TYPE_URI_HANDLER);
while (walk) {
handler = GST_URI_HANDLER (walk->data);
GstURIHandler *handler = GST_URI_HANDLER (walk->data);
if (g_str_has_prefix_glib22 ((gchar *) uri, handler->uri))
if (g_str_has_prefix_glib22 ((gchar *) uri, handler->uri)) {
result = handler;
break;
}
walk = g_list_next (walk);
}
g_list_free (orig);
return handler;
return result;
}
/**