diff options
author | Akemi <der.richter@gmx.de> | 2017-01-18 17:22:32 +0100 |
---|---|---|
committer | Akemi <der.richter@gmx.de> | 2017-01-19 14:58:15 +0100 |
commit | 9490b628c57e109b8e504dafeb43f409885c0337 (patch) | |
tree | 5565a1a686d903e5672d4e744e5e4200837a8031 /video/out/cocoa_common.m | |
parent | fe02e5023c4966a4d97a0999eca92c68be8aa15e (diff) | |
download | mpv-9490b628c57e109b8e504dafeb43f409885c0337.tar.bz2 mpv-9490b628c57e109b8e504dafeb43f409885c0337.tar.xz |
cocoa: don't init displaylink on reconfig
everytime we switched to a new video file a new displaylink was
initialised and started, but the old one was not stopped and released
beforehand. this lead to several displaylink callback calls per swap,
depending on how many files were switched beforehand. moving the
displaylink init call to the cocoa init functions will ever only init
one displaylink.
Fixes #4031
Diffstat (limited to 'video/out/cocoa_common.m')
-rw-r--r-- | video/out/cocoa_common.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index bf702c4cd4..2d4a4c517c 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -350,6 +350,7 @@ void vo_cocoa_init(struct vo *vo) pthread_cond_init(&s->sync_wakeup, NULL); vo->cocoa = s; vo_cocoa_update_screen_info(vo); + vo_cocoa_init_displaylink(vo); cocoa_init_light_sensor(vo); cocoa_add_screen_reconfiguration_observer(vo); if (!s->embedded) { @@ -637,7 +638,6 @@ int vo_cocoa_config_window(struct vo *vo) struct mp_vo_opts *opts = vo->opts; run_on_main_thread(vo, ^{ - vo_cocoa_init_displaylink(vo); vo_cocoa_update_screen_fps(vo); NSRect r = [s->current_screen frame]; |