mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 10:10:32 +00:00
glcontext: Add more assertions to make sure that everything sets the GError during context creation if something fails
This commit is contained in:
parent
9172cb8839
commit
9fd7e34fee
1 changed files with 6 additions and 2 deletions
|
@ -741,9 +741,11 @@ gst_gl_context_create_thread (GstGLContext * context)
|
||||||
window_class = GST_GL_WINDOW_GET_CLASS (context->window);
|
window_class = GST_GL_WINDOW_GET_CLASS (context->window);
|
||||||
|
|
||||||
if (window_class->open) {
|
if (window_class->open) {
|
||||||
if (!window_class->open (context->window, error))
|
if (!window_class->open (context->window, error)) {
|
||||||
|
g_assert (error == NULL || *error != NULL);
|
||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gl = context->gl_vtable;
|
gl = context->gl_vtable;
|
||||||
compiled_api = _compiled_api ();
|
compiled_api = _compiled_api ();
|
||||||
|
@ -834,8 +836,10 @@ gst_gl_context_create_thread (GstGLContext * context)
|
||||||
_create_context_gles2 (context, &context->priv->gl_major,
|
_create_context_gles2 (context, &context->priv->gl_major,
|
||||||
&context->priv->gl_minor, error);
|
&context->priv->gl_minor, error);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret) {
|
||||||
|
g_assert (error == NULL || *error != NULL);
|
||||||
goto failure;
|
goto failure;
|
||||||
|
}
|
||||||
|
|
||||||
/* GL core contexts and GLES3 */
|
/* GL core contexts and GLES3 */
|
||||||
if (gl->GetIntegerv && gl->GetStringi && context->priv->gl_major >= 3)
|
if (gl->GetIntegerv && gl->GetStringi && context->priv->gl_major >= 3)
|
||||||
|
|
Loading…
Reference in a new issue