diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-07-07 02:56:01 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-07-07 02:56:01 +0300 |
commit | a2037a2effbd4622d0e8336245a9b14c3f886bde (patch) | |
tree | bd2face6dd36d2663197b23a33da9e9b2814f70c /libvo/vo_corevideo.m | |
parent | 0c2773a709276681575d2507aa60ee85c2d0b850 (diff) | |
parent | 43079c51daa8c12b0a44e5ad8022c979dd9e8336 (diff) | |
download | mpv-a2037a2effbd4622d0e8336245a9b14c3f886bde.tar.bz2 mpv-a2037a2effbd4622d0e8336245a9b14c3f886bde.tar.xz |
Merge svn changes up to r29412
Diffstat (limited to 'libvo/vo_corevideo.m')
-rw-r--r-- | libvo/vo_corevideo.m | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libvo/vo_corevideo.m b/libvo/vo_corevideo.m index a9667fa4ed..7967921467 100644 --- a/libvo/vo_corevideo.m +++ b/libvo/vo_corevideo.m @@ -229,7 +229,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) @@ -239,9 +240,11 @@ static void draw_osd(void) static void flip_page(void) { - if(shared_buffer) + if(shared_buffer) { + NSAutoreleasePool *pool = [NSAutoreleasePool new]; [mplayerosxProto render]; - else { + [pool release]; + } else { [mpGLView setCurrentTexture]; [mpGLView render]; if (vo_doublebuffering) { @@ -367,10 +370,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); @@ -379,6 +379,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; |