diff options
author | Max Kellermann <max@duempel.org> | 2009-02-17 23:57:10 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-02-17 23:57:10 +0100 |
commit | 9d2f16d8272498f0c4b641ccfc493c849f558a5f (patch) | |
tree | d036507078814262ba76e06c1f73e0c3766f278e /src/player_thread.c | |
parent | 4aca1fa4935a42ccc7c330ff28ebd69b8f96e33c (diff) | |
download | mpd-9d2f16d8272498f0c4b641ccfc493c849f558a5f.tar.gz mpd-9d2f16d8272498f0c4b641ccfc493c849f558a5f.tar.xz mpd-9d2f16d8272498f0c4b641ccfc493c849f558a5f.zip |
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().
Diffstat (limited to '')
-rw-r--r-- | src/player_thread.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |