summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2012-11-05 07:45:54 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2012-11-05 22:03:15 +0100
commit3043690756f5bd2e220e5457f835237869f33001 (patch)
tree0ff6d51b7ee87ff840700812f415a376ab40fa17
parente6a6a602760387f2270bab0cab8426e178374f96 (diff)
downloadmpv-3043690756f5bd2e220e5457f835237869f33001.tar.bz2
mpv-3043690756f5bd2e220e5457f835237869f33001.tar.xz
cocoa_common: save vo struct earlier in the startup process
This prevents a crash with -fs option.
-rw-r--r--libvo/cocoa_common.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/libvo/cocoa_common.m b/libvo/cocoa_common.m
index b220da8798..39d5d74b92 100644
--- a/libvo/cocoa_common.m
+++ b/libvo/cocoa_common.m
@@ -370,6 +370,7 @@ static int create_window(struct vo *vo, uint32_t d_width, uint32_t d_height,
[s->window setAcceptsMouseMovedEvents:YES];
[s->glContext setView:glView];
[s->glContext makeCurrentContext];
+ [s->window setVideoOutput:vo];
[NSApp setDelegate:s->window];
[s->window setDelegate:s->window];
@@ -477,7 +478,6 @@ int vo_cocoa_check_events(struct vo *vo)
inMode:NSEventTrackingRunLoopMode dequeue:YES];
if (event == nil)
return 0;
- [s->window setVideoOutput:vo];
[NSApp sendEvent:event];
if (s->did_resize) {