aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/player_thread.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index 022e97f0f..82628ddc0 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -247,12 +247,23 @@ static bool player_seek_decoder(struct player *player)
where = 0.0;
ret = dc_seek(&pc.notify, where);
- if (ret)
- pc.elapsed_time = where;
+ if (!ret) {
+ player_command_finished();
+ return false;
+ }
+ pc.elapsed_time = where;
player_command_finished();
- return ret;
+ player->xfade = XFADE_UNKNOWN;
+
+ /* abort buffering when the user has requested
+ a seek */
+ player->buffering = false;
+
+ audio_output_all_cancel();
+
+ return true;
}
static void player_process_command(struct player *player)
@@ -294,15 +305,7 @@ static void player_process_command(struct player *player)
break;
case PLAYER_COMMAND_SEEK:
- 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();
- }
+ player_seek_decoder(player);
break;
case PLAYER_COMMAND_CANCEL: