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).
This commit is contained in:
parent
75c8aecffa
commit
5771d67202
1
NEWS
1
NEWS
|
@ -1,4 +1,5 @@
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue