gl: win32: fix crash when finalizing GstGLContext
authorXavier Claessens <xavier.claessens@collabora.com>
Wed, 20 May 2015 21:09:21 +0000 (17:09 -0400)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:02 +0000 (19:32 +0000)
commit77e1e70fdc466b208b42e87e751939fd659ff34c
treeb3eab744beb356fc6eb4ce849ca4b0605bbe17dc
parentdb0380a9eed650e3a62e8d92f8066863fda6ba39
gl: win32: fix crash when finalizing GstGLContext

gst_gl_context_finalize() is calling gst_gl_window_win32_quit()
which was posting a message. But then window_proc takes window's
context and get a NULL.

Now that we've got a GMainLoop we can do like other backends and
simply call g_main_loop_quit().

This also remove duplicated code to release the parent window and
potential crash there because parent_proc could be NULL if we never
created the internal window. That could happen for example if setting
state to READY then setting a window_handle, and go back to NULL state.

https://bugzilla.gnome.org/show_bug.cgi?id=749601
gst-libs/gst/gl/win32/gstglwindow_win32.c