mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
gldisplay: really retrieve glcontext for a specific thread
When requesting a glcontext (regardless of thread), the result was correct. However, when requesting current glcontext on a specific thread, it could come up with a glcontext active on another thread. https://bugzilla.gnome.org/show_bug.cgi?id=763168
This commit is contained in:
parent
31b1094744
commit
6d343abec8
1 changed files with 4 additions and 1 deletions
|
@ -437,8 +437,11 @@ _get_gl_context_for_thread_unlocked (GstGLDisplay * display, GThread * thread)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (thread == NULL)
|
||||||
|
return context;
|
||||||
|
|
||||||
context_thread = gst_gl_context_get_thread (context);
|
context_thread = gst_gl_context_get_thread (context);
|
||||||
if (thread != NULL && thread == context_thread) {
|
if (thread != context_thread) {
|
||||||
g_thread_unref (context_thread);
|
g_thread_unref (context_thread);
|
||||||
gst_object_unref (context);
|
gst_object_unref (context);
|
||||||
prev = l;
|
prev = l;
|
||||||
|
|
Loading…
Reference in a new issue