diff options
author | wm4 <wm4@nowhere> | 2016-09-16 20:24:52 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-16 20:24:52 +0200 |
commit | 4395a4f83709a538538cee9d14de522c024b1713 (patch) | |
tree | 8b0dabf5261c7a3b3946fc000e5d3547c7212a39 /player/main.c | |
parent | 56616b0b013cbeae69555ae95ff577482e82bb1f (diff) | |
download | mpv-4395a4f83709a538538cee9d14de522c024b1713.tar.bz2 mpv-4395a4f83709a538538cee9d14de522c024b1713.tar.xz |
player: don't enter playloop for client API requests
This _actually_ does what commit 8716c2e8 promised, and gives a slight
performance improvement for client API users which make a lot of
requests (like reading properties).
The main issue was that mp_dispatch_lock() (which client.c uses to get
exclusive access to the core) still called the wakeup callback, which
made mp_dispatch_queue_process() exit. So the playloop got executed
again, and since it does a lot of stuff, performance could be reduced.
Diffstat (limited to 'player/main.c')
-rw-r--r-- | player/main.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/player/main.c b/player/main.c index a6e82287d7..76300162f3 100644 --- a/player/main.c +++ b/player/main.c @@ -182,7 +182,6 @@ void mp_destroy(struct MPContext *mpctx) cas_terminal_owner(mpctx, NULL); } - mp_dispatch_set_wakeup_fn(mpctx->dispatch, NULL, NULL); mp_input_uninit(mpctx->input); uninit_libav(mpctx->global); @@ -356,7 +355,6 @@ struct MPContext *mp_create(void) #endif mp_input_set_cancel(mpctx->input, mpctx->playback_abort); - mp_dispatch_set_wakeup_fn(mpctx->dispatch, wakeup_playloop, mpctx); return mpctx; } |