mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-23 17:14:23 +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);
|
GST_DEBUG_OBJECT (lv2, "instantiating the plugin at %d Hz", sample_rate);
|
||||||
|
|
||||||
lv2->instance = slv2_plugin_instantiate (oclass->plugin, sample_rate, NULL);
|
if (!(lv2->instance =
|
||||||
|
slv2_plugin_instantiate (oclass->plugin, sample_rate, NULL)))
|
||||||
g_return_val_if_fail (lv2->instance != NULL, FALSE);
|
goto no_instance;
|
||||||
|
|
||||||
/* connect the control ports */
|
/* connect the control ports */
|
||||||
for (i = 0; i < gsp_class->num_control_in; i++)
|
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");
|
GST_WARNING_OBJECT (gsp, "got no sample-rate");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
no_instance:
|
||||||
|
{
|
||||||
|
GST_WARNING_OBJECT (gsp, "could not create instance");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue