mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
macOS gst-plugins-base/gl/cocoa: UI API called on a background thread: -[NSView removeFromSuperview]
The problem inside gstglwindow_cocoa.m, all UI operations must be called from main UI thread. https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/568 Fixes #568
This commit is contained in:
parent
6a99ad2c02
commit
31cb8500ee
1 changed files with 12 additions and 4 deletions
|
@ -240,16 +240,24 @@ gst_gl_window_cocoa_open (GstGLWindow *window, GError **err)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_gl_window_cocoa_close (GstGLWindow *window)
|
||||
_close_window (gpointer * data)
|
||||
{
|
||||
GstGLWindowCocoa *window_cocoa = GST_GL_WINDOW_COCOA (window);
|
||||
GstGLNSWindow *internal_win_id = (__bridge GstGLNSWindow *)window_cocoa->priv->internal_win_id;
|
||||
GstGLWindowCocoa *window_cocoa = GST_GL_WINDOW_COCOA (data);
|
||||
GstGLNSWindow *internal_win_id =
|
||||
(__bridge GstGLNSWindow *) window_cocoa->priv->internal_win_id;
|
||||
|
||||
[[internal_win_id contentView] removeFromSuperview];
|
||||
CFBridgingRelease(window_cocoa->priv->internal_win_id);
|
||||
CFBridgingRelease (window_cocoa->priv->internal_win_id);
|
||||
window_cocoa->priv->internal_win_id = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_gl_window_cocoa_close (GstGLWindow * window)
|
||||
{
|
||||
_invoke_on_main ((GstGLWindowCB) _close_window, gst_object_ref (window),
|
||||
(GDestroyNotify) gst_object_unref);
|
||||
}
|
||||
|
||||
static guintptr
|
||||
gst_gl_window_cocoa_get_window_handle (GstGLWindow *window)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue