From 938da2d4e2c893e2b5f7af23bd0039e49a26b608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 13 Apr 2008 13:54:55 +0000 Subject: [PATCH] gst/gstregistrybinary.c: If gst_registry_add_plugin() fails our reference to the plugin is invalid so don't try to us... 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 | 6 ++++++ gst/gstregistrybinary.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f902cc478c..8f37656a07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-13 Sebastian Dröge + + * 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 * tools/gst-xmlinspect.c: (print_element_info), (main): diff --git a/gst/gstregistrybinary.c b/gst/gstregistrybinary.c index 112b7f1fa5..5eb2a15e0b 100644 --- a/gst/gstregistrybinary.c +++ b/gst/gstregistrybinary.c @@ -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++) {