mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
gst/gstindex.c: get refcounting correct.
Original commit message from CVS: * gst/gstindex.c: get refcounting correct. * gst/gstregistry.c: Handle the case where a feature/plugin is not found.
This commit is contained in:
parent
c43514eb59
commit
107444fe44
3 changed files with 15 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-09-15 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
|
* gst/gstindex.c: get refcounting correct.
|
||||||
|
* gst/gstregistry.c: Handle the case where a feature/plugin is
|
||||||
|
not found.
|
||||||
|
|
||||||
2005-09-15 David Schleef <ds@schleef.org>
|
2005-09-15 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* check/Makefile.am:
|
* check/Makefile.am:
|
||||||
|
|
|
@ -914,10 +914,7 @@ gst_index_factory_new (const gchar * name, const gchar * longdesc, GType type)
|
||||||
GstIndexFactory *factory;
|
GstIndexFactory *factory;
|
||||||
|
|
||||||
g_return_val_if_fail (name != NULL, NULL);
|
g_return_val_if_fail (name != NULL, NULL);
|
||||||
factory = gst_index_factory_find (name);
|
factory = GST_INDEX_FACTORY (g_object_new (GST_TYPE_INDEX_FACTORY, NULL));
|
||||||
if (!factory) {
|
|
||||||
factory = GST_INDEX_FACTORY (g_object_new (GST_TYPE_INDEX_FACTORY, NULL));
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_PLUGIN_FEATURE_NAME (factory) = g_strdup (name);
|
GST_PLUGIN_FEATURE_NAME (factory) = g_strdup (name);
|
||||||
if (factory->longdesc)
|
if (factory->longdesc)
|
||||||
|
|
|
@ -354,11 +354,12 @@ gst_registry_find_plugin (GstRegistry * registry, const gchar * name)
|
||||||
|
|
||||||
walk = gst_registry_plugin_filter (registry,
|
walk = gst_registry_plugin_filter (registry,
|
||||||
(GstPluginFilter) gst_plugin_name_filter, TRUE, (gpointer) name);
|
(GstPluginFilter) gst_plugin_name_filter, TRUE, (gpointer) name);
|
||||||
if (walk)
|
if (walk) {
|
||||||
result = GST_PLUGIN (walk->data);
|
result = GST_PLUGIN (walk->data);
|
||||||
|
|
||||||
gst_object_ref (result);
|
gst_object_ref (result);
|
||||||
gst_plugin_list_free (walk);
|
gst_plugin_list_free (walk);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -392,11 +393,12 @@ gst_registry_find_feature (GstRegistry * registry, const gchar * name,
|
||||||
(GstPluginFeatureFilter) gst_plugin_feature_type_name_filter,
|
(GstPluginFeatureFilter) gst_plugin_feature_type_name_filter,
|
||||||
TRUE, &data);
|
TRUE, &data);
|
||||||
|
|
||||||
if (walk)
|
if (walk) {
|
||||||
feature = GST_PLUGIN_FEATURE (walk->data);
|
feature = GST_PLUGIN_FEATURE (walk->data);
|
||||||
|
|
||||||
gst_object_ref (feature->plugin);
|
gst_object_ref (feature->plugin);
|
||||||
gst_plugin_feature_list_free (walk);
|
gst_plugin_feature_list_free (walk);
|
||||||
|
}
|
||||||
|
|
||||||
return feature;
|
return feature;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue