summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2017-01-10 01:00:12 +1100
committerMatthew Waters <matthew@centricular.com>2017-01-13 11:31:08 +1100
commit1c3a5cb33e0df5b54d7dd61e5de3539768267928 (patch)
treede37d643aa8bda68280b56b32d3b714f2b15e8e5
parent2be08c61cc8ce9972d5f17255a5388859e084b92 (diff)
downloadgstreamer-plugins-bad-1c3a5cb33e0df5b54d7dd61e5de3539768267928.tar.gz
glcontext/egl: don't overwrite set GError
Doing so is an error and will cause a glib warning to be printed. https://bugzilla.gnome.org/show_bug.cgi?id=776722
-rw-r--r--gst-libs/gst/gl/egl/gstglcontext_egl.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.c b/gst-libs/gst/gl/egl/gstglcontext_egl.c
index 057c6a9ba..7bc1207b6 100644
--- a/gst-libs/gst/gl/egl/gstglcontext_egl.c
+++ b/gst-libs/gst/gl/egl/gstglcontext_egl.c
@@ -481,9 +481,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)
@@ -492,8 +496,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;
@@ -504,8 +507,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;