From 3e8510d515e9446f7c1f2b4372e501a713bb2502 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 14 Apr 2017 19:06:13 +0200 Subject: player: fix a corner case in previous commit The previous commit set "mpctx->playback_active = false;" before unload hooks were processed. This was intentional, but could in theory cause playback_active to be set to true again, and actually it's plain wrong if playback was exited in the middle it. There needs to be something else that forces playback_active to be set to false while in this unloading state. --- player/playloop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/playloop.c') diff --git a/player/playloop.c b/player/playloop.c index 2c3143ab61..2e18025cc4 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -124,8 +124,8 @@ void update_core_idle_state(struct MPContext *mpctx) { bool eof = mpctx->video_status == STATUS_EOF && mpctx->audio_status == STATUS_EOF; - bool active = - !mpctx->paused && mpctx->restart_complete && mpctx->playing && !eof; + bool active = !mpctx->paused && mpctx->restart_complete && mpctx->playing && + mpctx->in_playloop && !eof; if (mpctx->playback_active != active) { mpctx->playback_active = active; -- cgit v1.2.3