summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-11-16 22:05:16 +0200
committerStefan Kost <ensonic@users.sf.net>2009-11-19 21:11:35 +0200
commitd7a4293774a2b248d83d82fe083870ab96ad0266 (patch)
treee3da5b3a2b9a3a49f4c636e8d8b88da5a6e78a87 /ext
parentcd3b5d00cddb5f8b44ca6ad0716dfa1daaa944c7 (diff)
downloadgstreamer-plugins-bad-d7a4293774a2b248d83d82fe083870ab96ad0266.tar.gz
lv2: only use g_return_val_if_fail for checking pre-conditions
g_return_* can be disabled. Still we want to check for failed instance creation.
Diffstat (limited to 'ext')
-rw-r--r--ext/lv2/gstlv2.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/ext/lv2/gstlv2.c b/ext/lv2/gstlv2.c
index 99e5f5f61..067d1c0ac 100644
--- a/ext/lv2/gstlv2.c
+++ b/ext/lv2/gstlv2.c
@@ -612,9 +612,9 @@ gst_lv2_setup (GstSignalProcessor * gsp, GstCaps * caps)
GST_DEBUG_OBJECT (lv2, "instantiating the plugin at %d Hz", sample_rate);
- lv2->instance = slv2_plugin_instantiate (oclass->plugin, sample_rate, NULL);
-
- g_return_val_if_fail (lv2->instance != NULL, FALSE);
+ if (!(lv2->instance =
+ slv2_plugin_instantiate (oclass->plugin, sample_rate, NULL)))
+ goto no_instance;
/* connect the control ports */
for (i = 0; i < gsp_class->num_control_in; i++)
@@ -633,6 +633,11 @@ no_sample_rate:
GST_WARNING_OBJECT (gsp, "got no sample-rate");
return FALSE;
}
+no_instance:
+ {
+ GST_WARNING_OBJECT (gsp, "could not create instance");
+ return FALSE;
+ }
}
static gboolean