diff options
author | adrian <adrian@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-05-18 21:19:11 +0000 |
---|---|---|
committer | adrian <adrian@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-05-18 21:19:11 +0000 |
commit | af16d3f1201f5d046aa92129fada8c1d546cdfaf (patch) | |
tree | 5fc258c6ae3515a54f0b02f12314ada884f50b9a /libvo/vo_corevideo.m | |
parent | faa665d3e732b36271630981dfb9ec730bbf36d2 (diff) | |
download | mpv-af16d3f1201f5d046aa92129fada8c1d546cdfaf.tar.bz2 mpv-af16d3f1201f5d046aa92129fada8c1d546cdfaf.tar.xz |
When used with shared_buffer, there's no need for a NSApp object, which causes MPlayer to be marked as unresponsive.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29314 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_corevideo.m')
-rw-r--r-- | libvo/vo_corevideo.m | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libvo/vo_corevideo.m b/libvo/vo_corevideo.m index 2785cfdc8c..73d5bf961a 100644 --- a/libvo/vo_corevideo.m +++ b/libvo/vo_corevideo.m @@ -230,7 +230,8 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ static void check_events(void) { - [mpGLView check_events]; + if (mpGLView) + [mpGLView check_events]; } static void draw_osd(void) @@ -370,10 +371,7 @@ static int preinit(const char *arg) return -1; } - NSApplicationLoad(); autoreleasepool = [[NSAutoreleasePool alloc] init]; - NSApp = [NSApplication sharedApplication]; - isLeopardOrLater = floor(NSAppKitVersionNumber) > 824; if (!buffer_name) buffer_name = strdup(DEFAULT_BUFFER_NAME); @@ -382,6 +380,10 @@ static int preinit(const char *arg) if(!shared_buffer) { + NSApplicationLoad(); + NSApp = [NSApplication sharedApplication]; + isLeopardOrLater = floor(NSAppKitVersionNumber) > 824; + #if !defined (CONFIG_MACOSX_FINDER) || !defined (CONFIG_SDL) //this chunk of code is heavily based off SDL_macosx.m from SDL ProcessSerialNumber myProc, frProc; |