mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
gst/gstregistrybinary.c: If an element supports the Uri interface, returns a valid pointer to the supported URI proto...
Original commit message from CVS: * 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.
This commit is contained in:
parent
a9a7cf2c79
commit
dc71d29b62
2 changed files with 20 additions and 3 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
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:
|
||||
|
|
|
@ -280,7 +280,7 @@ gst_registry_binary_save_feature (GList ** list, GstPluginFeature * feature)
|
|||
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;
|
||||
|
||||
|
@ -681,8 +681,10 @@ gst_registry_binary_load_feature (GstRegistry * registry, gchar ** in,
|
|||
/* 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);
|
||||
|
||||
|
@ -858,6 +860,7 @@ gst_registry_binary_load_plugin (GstRegistry * registry, gchar ** in)
|
|||
|
||||
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);
|
||||
|
@ -872,7 +875,6 @@ gst_registry_binary_load_plugin (GstRegistry * registry, gchar ** in)
|
|||
|
||||
/* Errors */
|
||||
fail:
|
||||
gst_object_unref (plugin);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue