Commit 9dd2f6ed authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed crash when setting up the video output

AppKit could be accessed by a non-main-thread
parent 52576ea5
......@@ -184,7 +184,7 @@
- (void)drawFancyGradientEffectForTimeSlider;
- (id)videoView;
- (id)setupVideoView;
- (void)setupVideoView;
- (void)setVideoplayEnabled;
- (void)resizeWindow;
- (void)setNativeVideoSize:(NSSize)size;
......
......@@ -1762,7 +1762,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
return o_video_view;
}
- (id)setupVideoView
- (void)setupVideoView
{
// TODO: make lion fullscreen compatible with macosx-background and !embedded-video
if( var_InheritBool( VLCIntf, "macosx-background" ) && !b_nativeFullscreenMode )
......@@ -1851,7 +1851,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
[[o_video_view window] setAlphaValue: config_GetFloat( VLCIntf, "macosx-opaqueness" )];
return o_video_view;
}
- (void)setVideoplayEnabled
......
......@@ -1783,7 +1783,8 @@ unsigned int CocoaKeyToVLC( unichar i_key )
- (id)getVideoViewAtPositionX: (int *)pi_x Y: (int *)pi_y withWidth: (unsigned int*)pi_width andHeight: (unsigned int*)pi_height
{
id videoView = [o_mainwindow setupVideoView];
[o_mainwindow performSelectorOnMainThread:@selector(setupVideoView) withObject:nil waitUntilDone:YES];
id videoView = [o_mainwindow videoView];
NSRect videoRect = [videoView frame];
int i_x = (int)videoRect.origin.x;
int i_y = (int)videoRect.origin.y;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment