mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 22:01:27 +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
1 changed files with 7 additions and 5 deletions
12
gst/gsturi.c
12
gst/gsturi.c
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue