From 9d2f16d8272498f0c4b641ccfc493c849f558a5f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 17 Feb 2009 23:57:10 +0100 Subject: 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(). --- src/player_thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/player_thread.c b/src/player_thread.c index 06d44c7b4..83e412048 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -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; -- cgit v1.2.3