mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-27 02:10:41 +00:00
- 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:
parent
4b04aa61d9
commit
863e55c70e
12
gst/gsturi.c
12
gst/gsturi.c
|
@ -138,7 +138,7 @@ gst_uri_handler_find (const gchar *name)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* this is a straight copy from glib 2.2
|
* this is a straight copy from glib 2.2
|
||||||
* remove this function when glib 2.2 is sufficiently widespread and
|
* remove this function when glib 2.2 is sufficiently widespread and
|
||||||
* then change to using the regular g_str_has_prefix
|
* then change to using the regular g_str_has_prefix
|
||||||
|
@ -170,23 +170,25 @@ GstURIHandler*
|
||||||
gst_uri_handler_find_by_uri (const gchar *uri)
|
gst_uri_handler_find_by_uri (const gchar *uri)
|
||||||
{
|
{
|
||||||
GList *walk, *orig;
|
GList *walk, *orig;
|
||||||
GstURIHandler *handler = NULL;
|
GstURIHandler *result = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail (uri != NULL, NULL);
|
g_return_val_if_fail (uri != NULL, NULL);
|
||||||
|
|
||||||
orig = walk = gst_registry_pool_feature_list (GST_TYPE_URI_HANDLER);
|
orig = walk = gst_registry_pool_feature_list (GST_TYPE_URI_HANDLER);
|
||||||
|
|
||||||
while (walk) {
|
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;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
walk = g_list_next (walk);
|
walk = g_list_next (walk);
|
||||||
}
|
}
|
||||||
g_list_free (orig);
|
g_list_free (orig);
|
||||||
|
|
||||||
return handler;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue