diff options
author | Alexey Chernov <achernov@neosphere.com> | 2013-01-11 19:24:43 +0400 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-01-16 14:43:56 +0400 |
commit | a8fe984d6589bf41562ebb06ef224dc9c5cdc519 (patch) | |
tree | 3135cff4b8fd52b987ca48ea9bd5d1d20af09aef /sys/osxvideo | |
parent | 77fde4b8ba0bd853564ee63ea34b8be8d2e88f15 (diff) |
osxvideosink: Fix crash in osxvideosink with external window output
Diffstat (limited to 'sys/osxvideo')
-rw-r--r-- | sys/osxvideo/cocoawindow.m | 2 | ||||
-rw-r--r-- | sys/osxvideo/osxvideosink.m | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/sys/osxvideo/cocoawindow.m b/sys/osxvideo/cocoawindow.m index 3ba3812f2..6b9540ecf 100644 --- a/sys/osxvideo/cocoawindow.m +++ b/sys/osxvideo/cocoawindow.m @@ -69,8 +69,6 @@ width = size.width; height = size.height; - [gstview setVideoSize: (int) width:(int) height]; - [super setContentSize:size]; } diff --git a/sys/osxvideo/osxvideosink.m b/sys/osxvideo/osxvideosink.m index 349216421..873df0609 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]; |