mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-14 12:04:11 +00:00
osxvideosink: fix segfault accessing osxwindow when not set yet
This commit is contained in:
parent
b0b0557c48
commit
baa23d314d
1 changed files with 4 additions and 3 deletions
|
@ -231,6 +231,7 @@ gst_osx_video_sink_osxwindow_create (GstOSXVideoSink * osxvideosink, gint width,
|
|||
osxwindow->width = width;
|
||||
osxwindow->height = height;
|
||||
osxwindow->closed = FALSE;
|
||||
osxwindow->internal = FALSE;
|
||||
|
||||
/* Allocate our GstGLView for the window, and then tell the application
|
||||
* about it (hopefully it's listening...) */
|
||||
|
@ -683,11 +684,11 @@ gst_osx_video_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle
|
|||
gst_osx_video_sink_call_from_main_thread(osxvideosink,
|
||||
osxvideosink->osxwindow->gstview,
|
||||
@selector(addToSuperview:), osxvideosink->superview, YES);
|
||||
if (window_id) {
|
||||
osxvideosink->osxwindow->internal = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (window_id) {
|
||||
osxvideosink->osxwindow->internal = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue