diff options
author | Max Kellermann <max@musicpd.org> | 2018-10-29 23:06:32 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-10-29 23:06:32 +0100 |
commit | 9b6a2589e5106fd88e2efc4c4d5afdd38b71be6a (patch) | |
tree | d3b5c5d45004bb1b1ac92779817f5f519dfb31a0 /src/player | |
parent | 92523f8cf2d58d3d2d0cf15706acdb8cba4c2af8 (diff) | |
parent | cc5fab28af0a37aa48a6f445e1ac5cc5ef80f933 (diff) |
Merge branch 'v0.20.x'
Diffstat (limited to 'src/player')
-rw-r--r-- | src/player/Control.cxx | 8 | ||||
-rw-r--r-- | src/player/Thread.cxx | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/player/Control.cxx b/src/player/Control.cxx index b53984c53..67eaec7a1 100644 --- a/src/player/Control.cxx +++ b/src/player/Control.cxx @@ -291,12 +291,8 @@ PlayerControl::LockSeek(std::unique_ptr<DetachedSong> song, SongTime t) assert(song != nullptr); - { - const std::lock_guard<Mutex> protect(mutex); - SeekLocked(std::move(song), t); - } - - idle_add(IDLE_PLAYER); + const std::lock_guard<Mutex> protect(mutex); + SeekLocked(std::move(song), t); } void diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx index cd930c039..5e2f7f853 100644 --- a/src/player/Thread.cxx +++ b/src/player/Thread.cxx @@ -606,6 +606,8 @@ Player::SeekDecoder() noexcept pc.outputs.Cancel(); } + idle_add(IDLE_PLAYER); + if (!dc.IsSeekableCurrentSong(*pc.next_song)) { /* the decoder is already decoding the "next" song - stop it and start the previous song again */ |