glwindow: move g_main_context_push/pop_thread_default() to run()
authorMatthew Waters <matthew@centricular.com>
Mon, 28 Nov 2016 03:22:05 +0000 (14:22 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:25 +0000 (19:32 +0000)
commit7306f2de2c753c90330c24c109bec81cbe16b6e3
treed9c001b186811448de9778610fe0d6b08fdf4617
parentf22390e46e52ef52f2854acd7ef198d708d14e98
glwindow: move g_main_context_push/pop_thread_default() to run()

Calling g_main_context_push_thread and then g_main_context_invoke()
(used by gst_gl_window_send_message_async()) in the same thread will
cause the invoked function to run immediately instead of being delayed.

This had implications for the creation of the OpenGL context not waiting
until the main loop had completely started up and as a result would
sometimes deadlock in short create/destroy scenarios.

https://bugzilla.gnome.org/show_bug.cgi?id=775171
gst-libs/gst/gl/gstglwindow.c