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>
+
* check/Makefile.am:
* check/gst/gstplugin.c: Add test
* gst/gstplugin.c: Fix problems noticed by testsuite
GstIndexFactory *factory;
g_return_val_if_fail (name != NULL, NULL);
- factory = gst_index_factory_find (name);
- if (!factory) {
- factory = GST_INDEX_FACTORY (g_object_new (GST_TYPE_INDEX_FACTORY, NULL));
- }
+ factory = GST_INDEX_FACTORY (g_object_new (GST_TYPE_INDEX_FACTORY, NULL));
GST_PLUGIN_FEATURE_NAME (factory) = g_strdup (name);
if (factory->longdesc)
walk = gst_registry_plugin_filter (registry,
(GstPluginFilter) gst_plugin_name_filter, TRUE, (gpointer) name);
- if (walk)
+ if (walk) {
result = GST_PLUGIN (walk->data);
- gst_object_ref (result);
- gst_plugin_list_free (walk);
+ gst_object_ref (result);
+ gst_plugin_list_free (walk);
+ }
return result;
}
(GstPluginFeatureFilter) gst_plugin_feature_type_name_filter,
TRUE, &data);
- if (walk)
+ if (walk) {
feature = GST_PLUGIN_FEATURE (walk->data);
- gst_object_ref (feature->plugin);
- gst_plugin_feature_list_free (walk);
+ gst_object_ref (feature->plugin);
+ gst_plugin_feature_list_free (walk);
+ }
return feature;
}