diff options
author | Alexey Chernov <achernov@neosphere.com> | 2013-01-11 19:24:43 +0400 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2013-01-23 10:32:28 +0000 |
commit | b38db5f538b76cf2f0be52ecff8e26702a0ea23c (patch) | |
tree | 27011f07e837281c6c67769ff2ffa256eeede5b9 /sys/osxvideo/osxvideosink.m | |
parent | 9b435a4b76ff647d56fef501d22b6eef5725963c (diff) |
osxvideosink: Fix crash in osxvideosink with external window output
Diffstat (limited to 'sys/osxvideo/osxvideosink.m')
-rw-r--r-- | sys/osxvideo/osxvideosink.m | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/osxvideo/osxvideosink.m b/sys/osxvideo/osxvideosink.m index 9c1b8d63f..f1faf2213 100644 --- a/sys/osxvideo/osxvideosink.m +++ b/sys/osxvideo/osxvideosink.m @@ -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]; |