Commit 5771d672 authored by Max Kellermann's avatar Max Kellermann

player/Thread: cancel outputs before seeking

.. instead of doing it after seeking. After seeking, the command had no effect, because CheckDecoderStartup() waits for all outputs to finish. This caused a very long delay while seeking and switching songs (https://bugs.musicpd.org/view.php?id=4534).
parent 75c8aecf
ver 0.19.16 (not yet released)
* faster seeking
* fix system include path order
* add missing DocBook file to tarball
......
......@@ -518,6 +518,8 @@ Player::SeekDecoder()
{
assert(pc.next_song != nullptr);
pc.outputs.Cancel();
const SongTime start_time = pc.next_song->GetStartTime();
if (!dc.LockIsCurrentSong(*pc.next_song)) {
......@@ -583,8 +585,6 @@ Player::SeekDecoder()
/* re-fill the buffer after seeking */
buffering = true;
pc.outputs.Cancel();
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment