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)
committerMatthew Waters <matthew@centricular.com>
Mon, 28 Nov 2016 03:27:03 +0000 (14:27 +1100)
commit024e92afe7bb6ab019876ceeb97041129b95c0d7
treea8e4285e06d891505d46ba734b3e89179ff59ebe
parent25fbc6d877b81fb5cd2731edc01d05bf900420dc
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