summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Chernov <achernov@neosphere.com>2013-01-11 19:24:43 +0400
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-01-16 11:39:46 +0100
commitdc276a7c2a909edca365f91d6ee434747ae5cf66 (patch)
tree457b3d3788ea162cc13974699fd0f2f0b93ae8ee
parent162924850291ab70ef3046d68ec83f6ccaa0a5d1 (diff)
osxvideosink: Fix crash in osxvideosink with external window output
-rw-r--r--sys/osxvideo/cocoawindow.m2
-rw-r--r--sys/osxvideo/osxvideosink.m11
2 files changed, 10 insertions, 3 deletions
diff --git a/sys/osxvideo/cocoawindow.m b/sys/osxvideo/cocoawindow.m
index 6a6281c54..9c894dd90 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 2e239e8d6..4419d37b8 100644
--- a/sys/osxvideo/osxvideosink.m
+++ b/sys/osxvideo/osxvideosink.m
@@ -700,6 +700,10 @@ gst_osx_video_sink_set_window_handle (GstXOverlay * overlay, guintptr handle_id)
osxvideosink->osxwindow->gstview,
@selector(addToSuperview:), osxvideosink->superview, YES);
}
+
+ if (window_id) {
+ osxvideosink->osxwindow->internal = FALSE;
+ }
}
static void
@@ -863,7 +867,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];