mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
glcontext_egl: check if eglChooseConfig has a matching config
The specs recommends to also check the num_config parameter.
This commit is contained in:
parent
abd80b6561
commit
96363a3425
1 changed files with 5 additions and 2 deletions
|
@ -408,6 +408,7 @@ gst_gl_context_egl_choose_config (GstGLContextEGL * egl, GstGLAPI gl_api,
|
|||
gint i = 0;
|
||||
EGLint config_attrib[20];
|
||||
EGLint egl_api = 0;
|
||||
EGLBoolean ret = EGL_FALSE;
|
||||
|
||||
create_context =
|
||||
gst_gl_check_extension ("EGL_KHR_create_context", egl->egl_exts);
|
||||
|
@ -450,8 +451,10 @@ gst_gl_context_egl_choose_config (GstGLContextEGL * egl, GstGLAPI gl_api,
|
|||
config_attrib[i++] = 1;
|
||||
config_attrib[i++] = EGL_NONE;
|
||||
|
||||
if (eglChooseConfig (egl->egl_display, config_attrib,
|
||||
&egl->egl_config, 1, &numConfigs)) {
|
||||
ret = eglChooseConfig (egl->egl_display, config_attrib,
|
||||
&egl->egl_config, 1, &numConfigs);
|
||||
|
||||
if (ret && numConfigs == 1) {
|
||||
GST_INFO ("config set: %" G_GUINTPTR_FORMAT ", %u",
|
||||
(guintptr) egl->egl_config, (unsigned int) numConfigs);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue