gst/gstregistrybinary.c: If gst_registry_add_plugin() fails our reference to the...
authorSebastian Dröge <slomo@circular-chaos.org>
Sun, 13 Apr 2008 13:54:55 +0000 (13:54 +0000)
committerSebastian Dröge <slomo@circular-chaos.org>
Sun, 13 Apr 2008 13:54:55 +0000 (13:54 +0000)
Original commit message from CVS:
* gst/gstregistrybinary.c: (gst_registry_binary_load_plugin):
If gst_registry_add_plugin() fails our reference to the plugin is
invalid so don't try to use it anymore and instead error out.

ChangeLog
gst/gstregistrybinary.c

index f902cc4..8f37656 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-13  Sebastian Dröge  <slomo@circular-chaos.org>
+
+       * gst/gstregistrybinary.c: (gst_registry_binary_load_plugin):
+       If gst_registry_add_plugin() fails our reference to the plugin is
+       invalid so don't try to use it anymore and instead error out.
+
 2008-04-12  Tim-Philipp Müller  <tim at centricular dot net>
 
        * tools/gst-xmlinspect.c: (print_element_info), (main):
index 112b7f1..5eb2a15 100644 (file)
@@ -857,7 +857,10 @@ gst_registry_binary_load_plugin (GstRegistry * registry, gchar ** in)
   GST_LOG ("read strings for '%s'", plugin->desc.name);
 
   plugin->basename = g_path_get_basename (plugin->filename);
-  gst_registry_add_plugin (registry, plugin);
+
+  if (!gst_registry_add_plugin (registry, plugin))
+    return FALSE;
+
   GST_INFO ("Added plugin '%s' plugin with %d features from binary registry",
       plugin->desc.name, pe->nfeatures);
   for (i = 0; i < pe->nfeatures; i++) {