From 13d2eb8eb9c54021fb6ee4ff4a5292e75539ab8a Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 21 Feb 2017 15:16:38 +0100 Subject: player: fix stats-logging of sleep state --- player/playloop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'player') 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"); } -- cgit v1.2.3