+2008-04-16 Sebastian Dröge <slomo@circular-chaos.org>
+
+ * gst/gstregistrybinary.c: (gst_registry_binary_save_feature),
+ (gst_registry_binary_load_feature),
+ (gst_registry_binary_load_plugin):
+ If an element supports the Uri interface, returns a valid pointer
+ to the supported URI protocols but this pointer contains nothing
+ don't try to save that as it will corrupt the registry.
+
+ Don't unref the plugin if we added it to the registry already but
+ fail to load a feature as gst_registry_add_plugin() takes ownership
+ of the plugin.
+
+ Improve debugging a bit.
+
2008-04-16 Stefan Kost <ensonic@users.sf.net>
* gst/gsttaglist.h:
GST_DEBUG ("Saved %d Interfaces", ef->ninterfaces);
/* save uritypes */
if (GST_URI_TYPE_IS_VALID (factory->uri_type)) {
- if (factory->uri_protocols) {
+ if (factory->uri_protocols && *factory->uri_protocols) {
GstBinaryChunk *subchk;
gchar **protocol;
/* unpack plugin feature strings */
unpack_string (*in, type_name);
- if (!type_name || !*(type_name))
+ if (!type_name || !*(type_name)) {
+ GST_ERROR ("No feature type name");
return FALSE;
+ }
GST_DEBUG ("Plugin '%s' feature typename : '%s'", plugin_name, type_name);
plugin->basename = g_path_get_basename (plugin->filename);
+ /* Takes ownership of plugin */
gst_registry_add_plugin (registry, plugin);
GST_INFO ("Added plugin '%s' plugin with %d features from binary registry",
plugin->desc.name, pe->nfeatures);
/* Errors */
fail:
- gst_object_unref (plugin);
return FALSE;
}