mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
osxvideosink: Fix crash in osxvideosink with external window output
This commit is contained in:
parent
77fde4b8ba
commit
a8fe984d65
2 changed files with 10 additions and 3 deletions
|
@ -69,8 +69,6 @@
|
|||
width = size.width;
|
||||
height = size.height;
|
||||
|
||||
[gstview setVideoSize: (int) width:(int) height];
|
||||
|
||||
[super setContentSize:size];
|
||||
}
|
||||
|
||||
|
|
|
@ -683,6 +683,10 @@ gst_osx_video_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle
|
|||
osxvideosink->osxwindow->gstview,
|
||||
@selector(addToSuperview:), osxvideosink->superview, YES);
|
||||
}
|
||||
|
||||
if (window_id) {
|
||||
osxvideosink->osxwindow->internal = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -838,7 +842,12 @@ gst_osx_video_sink_get_type (void)
|
|||
|
||||
GST_INFO_OBJECT (osxvideosink, "resizing");
|
||||
NSSize size = {osxwindow->width, osxwindow->height};
|
||||
[osxwindow->win setContentSize:size];
|
||||
if (osxwindow->internal) {
|
||||
[osxwindow->win setContentSize:size];
|
||||
}
|
||||
if (osxwindow->gstview) {
|
||||
[osxwindow->gstview setVideoSize :(int)osxwindow->width :(int)osxwindow->height];
|
||||
}
|
||||
GST_INFO_OBJECT (osxvideosink, "done");
|
||||
|
||||
[pool release];
|
||||
|
|
Loading…
Reference in a new issue