mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
libs: egl: utils: mark context as wrapped when it is
The returning egl context may be null, so we should check the return value. https://bugzilla.gnome.org/show_bug.cgi?id=795391
This commit is contained in:
parent
9fde93f80c
commit
4af46f00c2
1 changed files with 4 additions and 0 deletions
|
@ -1117,11 +1117,15 @@ egl_context_new_wrapped (EglDisplay * display, EGLContext gl_context)
|
||||||
args.display = display;
|
args.display = display;
|
||||||
args.config = config;
|
args.config = config;
|
||||||
args.gl_parent_context = gl_context;
|
args.gl_parent_context = gl_context;
|
||||||
|
args.context = NULL;
|
||||||
success = egl_display_run (display, (EglContextRunFunc) do_egl_context_new,
|
success = egl_display_run (display, (EglContextRunFunc) do_egl_context_new,
|
||||||
&args);
|
&args);
|
||||||
egl_object_unref (config);
|
egl_object_unref (config);
|
||||||
if (!success)
|
if (!success)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (args.context)
|
||||||
|
args.context->base.is_wrapped = TRUE;
|
||||||
return args.context;
|
return args.context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue