glcontext/cocoa: handle sending one message during shutdown
authorMatthew Waters <matthew@centricular.com>
Thu, 26 Mar 2020 02:51:24 +0000 (13:51 +1100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 26 Mar 2020 11:25:44 +0000 (11:25 +0000)
commit7f59cefafb1cd733cf527fb935b2cd32418fcbe2
tree547e24354bb5267c4ebf98f761c5c847cc5686df
parent3a9fde7b24ee8f4d88a31ae33d85fd933df58786
glcontext/cocoa: handle sending one message during shutdown

gst_gl_window_quit() will attempt to send a message but will be called
from GstGLContext's finalize handler and so the weak ref that backs
gst_gl_window_get_context will return NULL as it has already been
cleared.  We need that context in send_message_async to decide whether
to run the provided callback immediately or queue in GCD
gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m