summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-03-01 21:27:37 +0100
committerwm4 <wm4@nowhere>2014-03-01 21:29:13 +0100
commit8f2ee917d410094c8718172e417d8d6f5f8f040f (patch)
treeadc68f10056f3d464726f9e0fa50b671e15b593d /player/core.h
parent4de22d1cbc1ff8201f66629ca75de32e7e7ed223 (diff)
downloadmpv-8f2ee917d410094c8718172e417d8d6f5f8f040f.tar.bz2
mpv-8f2ee917d410094c8718172e417d8d6f5f8f040f.tar.xz
player: cheap hack against idle event feedback loop
The OSC used significant CPU time while the player was paused. It turned out that the "tick" event sent during pause is the problem. The OSC accesses the player core when receiving a tick event, which in turn will cause the core to send another tick event, leading to infinite feedback. Fix this by sending an idle tick only every 500ms. This is not very proper, but the idea behind the tick event isn't very clean to begin with (and the OSC should use timers instead).
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/core.h b/player/core.h
index e14229174e..9ece9ebb4d 100644
--- a/player/core.h
+++ b/player/core.h
@@ -293,6 +293,7 @@ typedef struct MPContext {
double last_heartbeat;
double last_metadata_update;
+ double last_idle_tick;
double mouse_timer;
unsigned int mouse_event_ts;