Commit 9d2f16d8 authored by Max Kellermann's avatar Max Kellermann

player_thread: don't drop audio buffers when not seekable

When a file is not seekable, MPD dropped the audio buffers before even attempting to seek. This caused noticable sound corruption. Fix: first attempt to seek, and only if that succeeds, call audio_output_all_cancel().
parent 4aca1fa4
......@@ -204,13 +204,14 @@ static void player_process_command(struct player *player)
break;
case PLAYER_COMMAND_SEEK:
audio_output_all_cancel();
if (player_seek_decoder(player)) {
player->xfade = XFADE_UNKNOWN;
/* abort buffering when the user has requested
a seek */
player->buffering = false;
audio_output_all_cancel();
}
break;
......
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