mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
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.
This commit is contained in:
parent
cd3b5d00cd
commit
d7a4293774
1 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue