diff options
Diffstat (limited to 'ext/lv2')
-rw-r--r-- | ext/lv2/gstlv2.c | 11 |
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 |