Commit 7cc1431a authored by Matthew Waters's avatar Matthew Waters
Browse files

libs/glheaders: move object creation to the gl thread where necessary

Some GL platforms (EGL, WGL) require deactivating the OpenGL context in
one thread before it can be used in another thread which this test
currently violates and would e.g. result in EGL_BAD_ACCESS errors from

Fix by moving the object creation into the GL thread instead and not
requiring additional gst_gl_context_activate() calls.
parent 9e563a20
......@@ -137,20 +137,19 @@ GST_START_TEST (test_constructors)
GST_START_TEST (test_constructors_require_activated_context)
static void
_construct_with_activated_context (GstGLContext * context, gpointer unused)
gboolean ret = FALSE;
GstGLFramebuffer *framebuffer = NULL;
ret = gst_gl_context_activate (context, TRUE);
fail_if (!ret);
framebuffer = gst_gl_framebuffer_new (context);
fail_if (framebuffer == NULL);
gst_object_unref (framebuffer);
ret = gst_gl_context_activate (context, FALSE);
fail_if (!ret);
GST_START_TEST (test_constructors_require_activated_context)
gst_gl_context_thread_add (context, _construct_with_activated_context, NULL);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment