diff options
author | sfan5 <sfan5@live.de> | 2021-07-18 12:11:29 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-07-18 12:22:55 +0200 |
commit | 3e28c8e983c01c9892f40da5afa2f2dff65c6c75 (patch) | |
tree | bb5d30b271e03a9913ed876ba8f5bb0b02da6525 /player | |
parent | d2a56227dfc8b0e62d4b6458ef4c5d0ecd28cf75 (diff) | |
download | mpv-3e28c8e983c01c9892f40da5afa2f2dff65c6c75.tar.bz2 mpv-3e28c8e983c01c9892f40da5afa2f2dff65c6c75.tar.xz |
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.
Diffstat (limited to 'player')
-rw-r--r-- | player/playloop.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |