summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-02-21 15:16:38 +0100
committerwm4 <wm4@nowhere>2017-02-21 15:39:44 +0100
commit13d2eb8eb9c54021fb6ee4ff4a5292e75539ab8a (patch)
tree8d09203d2bf7cd4453da6860eff1fd2c625e706d /player
parent7dd81c3f967c84bb7e6090be0a4f2c4ceaaba682 (diff)
downloadmpv-13d2eb8eb9c54021fb6ee4ff4a5292e75539ab8a.tar.bz2
mpv-13d2eb8eb9c54021fb6ee4ff4a5292e75539ab8a.tar.xz
player: fix stats-logging of sleep state
Diffstat (limited to 'player')
-rw-r--r--player/playloop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/player/playloop.c b/player/playloop.c
index b014977c36..742f31d3b2 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -56,7 +56,8 @@
// mp_wait_events() was called.
void mp_wait_events(struct MPContext *mpctx)
{
- if (mpctx->sleeptime > 0)
+ bool sleeping = mpctx->sleeptime > 0;
+ if (sleeping)
MP_STATS(mpctx, "start sleep");
mpctx->in_dispatch = true;
@@ -66,7 +67,7 @@ void mp_wait_events(struct MPContext *mpctx)
mpctx->in_dispatch = false;
mpctx->sleeptime = INFINITY;
- if (mpctx->sleeptime > 0)
+ if (sleeping)
MP_STATS(mpctx, "end sleep");
}