diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.c b/gst-libs/gst/gl/egl/gstglcontext_egl.c index 25cd8a8d73..8d7254905a 100644 --- a/gst-libs/gst/gl/egl/gstglcontext_egl.c +++ b/gst-libs/gst/gl/egl/gstglcontext_egl.c @@ -439,9 +439,13 @@ gst_gl_context_egl_create_context (GstGLContext * context, for (i = 0; i < G_N_ELEMENTS (gles2_versions); i++) { gint profileMask = 0; gint contextFlags = 0; + guint maj = gles2_versions[i].major; + guint min = gles2_versions[i].minor; - if (!gst_gl_context_egl_choose_config (egl, GST_GL_API_GLES2, - gles2_versions[i].major, error)) { + if (!gst_gl_context_egl_choose_config (egl, GST_GL_API_GLES2, maj, error)) { + GST_DEBUG_OBJECT (context, "Failed to choose a GLES%d config: %s", + maj, error && *error ? (*error)->message : "Unknown"); + g_clear_error (error); continue; } #if defined(EGL_KHR_create_context) @@ -450,8 +454,7 @@ gst_gl_context_egl_create_context (GstGLContext * context, egl->egl_context = _create_context_with_flags (egl, (EGLContext) external_gl_context, - GST_GL_API_GLES2, gles2_versions[i].major, - gles2_versions[i].minor, contextFlags, profileMask); + GST_GL_API_GLES2, maj, min, contextFlags, profileMask); if (egl->egl_context) break; @@ -462,8 +465,7 @@ gst_gl_context_egl_create_context (GstGLContext * context, egl->egl_context = _create_context_with_flags (egl, (EGLContext) external_gl_context, - GST_GL_API_GLES2, gles2_versions[i].major, - gles2_versions[i].minor, contextFlags, profileMask); + GST_GL_API_GLES2, maj, min, contextFlags, profileMask); if (egl->egl_context) break;