From 3e28c8e983c01c9892f40da5afa2f2dff65c6c75 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 18 Jul 2021 12:11:29 +0200 Subject: player: fix missed pause state update during reset in some cases When playing a new file, if paused_for_cache was true before being reset the AO would never be unpaused because that state was thrown away, leaving it stuck. Fix this by updating the pause state before resetting that variable. Note that this does not make the second update_internal_pause_state() call redundant. This fixes the same bug fb5d976cb0 was supposed to. --- player/playloop.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'player') diff --git a/player/playloop.c b/player/playloop.c index 87c8b6390c..c0658ac6af 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -239,6 +239,10 @@ void reset_playback_state(struct MPContext *mpctx) sub_set_play_dir(t->d_sub, mpctx->play_dir); } + // May need unpause first + if (mpctx->paused_for_cache) + update_internal_pause_state(mpctx); + mpctx->hrseek_active = false; mpctx->hrseek_lastframe = false; mpctx->hrseek_backstep = false; -- cgit v1.2.3