plugins: use early return without goto

https://bugzilla.gnome.org/show_bug.cgi?id=774782
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-11-21 12:29:26 +01:00
parent acefc7e384
commit ac18e0479f

View file

@ -699,22 +699,16 @@ ensure_sinkpad_buffer_pool (GstVaapiPluginBase * plugin, GstCaps * caps)
}
if (!ensure_sinkpad_allocator (plugin, caps, &size))
goto error;
return FALSE;
pool = gst_vaapi_plugin_base_create_pool (plugin, caps, size, 0, 0,
GST_VAAPI_VIDEO_BUFFER_POOL_OPTION_VIDEO_META, plugin->sinkpad_allocator);
if (!pool)
goto error;
return FALSE;
plugin->sinkpad_buffer_pool = pool;
plugin->sinkpad_buffer_size = size;
return TRUE;
/* ERRORS */
error:
{
/* error message already sent */
return FALSE;
}
}
/**