diff --git a/NEWS b/NEWS index db8cdb497..ffb1a2ef2 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.20.23 (not yet released) +* protocol + - emit "player" idle event when restarting the current song * new clang crash bug workaround ver 0.20.22 (2018/10/23) diff --git a/src/player/Control.cxx b/src/player/Control.cxx index 013b57bf5..0c18a09fa 100644 --- a/src/player/Control.cxx +++ b/src/player/Control.cxx @@ -246,12 +246,8 @@ PlayerControl::LockSeek(DetachedSong *song, SongTime t) { assert(song != nullptr); - { - const std::lock_guard protect(mutex); - SeekLocked(song, t); - } - - idle_add(IDLE_PLAYER); + const std::lock_guard protect(mutex); + SeekLocked(song, t); } void diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx index fcb7b39da..001c96fa1 100644 --- a/src/player/Thread.cxx +++ b/src/player/Thread.cxx @@ -580,6 +580,8 @@ Player::SeekDecoder() { assert(pc.next_song != nullptr); + idle_add(IDLE_PLAYER); + pc.outputs.Cancel(); const SongTime start_time = pc.next_song->GetStartTime();