glwindow_cocoa: fix window not closing (w/o user window handle)
A user-supplied window handle (external_view) becomes the superView of internal_view, which is closed with [view removeFromSuperview]. This fails silently if external_view = NULL (no handle supplied). Call [win_internal_id close] in this case. Fixes #4432. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9049>
This commit is contained in:
parent
224da2b947
commit
5268156447
@ -257,6 +257,13 @@ _close_window (gpointer * data)
|
||||
|
||||
[view removeFromSuperview];
|
||||
|
||||
if (!window_cocoa->priv->external_view) {
|
||||
GstGLNSWindow *internal_win_id =
|
||||
(__bridge GstGLNSWindow *) window_cocoa->priv->internal_win_id;
|
||||
|
||||
[internal_win_id close];
|
||||
}
|
||||
|
||||
CFBridgingRelease (window_cocoa->priv->internal_win_id);
|
||||
CFBridgingRelease (window_cocoa->priv->internal_view);
|
||||
window_cocoa->priv->internal_win_id = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user