diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-12-06 21:54:51 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-12-06 21:55:36 +0100 |
commit | 2833670b712776f4d257ac973e32d8c69c7dc740 (patch) | |
tree | b6ac8a6de650219f15a9fc3c6aec736acff96e7d /video | |
parent | 13b4fb9d28ceeaf3ba505b13888268039bf5cc63 (diff) | |
download | mpv-2833670b712776f4d257ac973e32d8c69c7dc740.tar.bz2 mpv-2833670b712776f4d257ac973e32d8c69c7dc740.tar.xz |
cocoa: fix view leak in uninit when fullscreen
Diffstat (limited to 'video')
-rw-r--r-- | video/out/cocoa_common.m | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index fb813fd773..14425ef13a 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -208,10 +208,18 @@ void vo_cocoa_uninit(struct vo *vo) enable_power_management(vo); cocoa_rm_fs_screen_profile_observer(vo); + // make sure we exit fullscreen before releasing stuff to make sure our + // events view retain count actually reaches 0 + if (!s->embedded) + [(MpvEventsView *)s->view setFullScreen:NO]; + [s->gl_ctx release]; [s->view removeFromSuperview]; [s->view release]; - if (s->window) [s->window release]; + + // if using --wid + libmpv there's no window to release + if (s->window) + [s->window release]; }); } |