summaryrefslogtreecommitdiff
path: root/src/player
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-11-05 00:30:04 +0100
committerMax Kellermann <max@duempel.org>2015-11-05 00:30:04 +0100
commite6b37703daf859383358f409fab9fafdb4873a1d (patch)
tree28280a4a6b3e03d703c8bf77090a1ccd1a9cfaf4 /src/player
parent990f473bb3b590de34931c9dfa485e2a33d832fd (diff)
player/Thread: copy pc.seek_time in ActivateDecoder()
If this gets called while seeking, do the right thing. This moves the elapsed_time setter from method Run(), which is now redundant.
Diffstat (limited to 'src/player')
-rw-r--r--src/player/Thread.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx
index b251cddfb..5673f4867 100644
--- a/src/player/Thread.cxx
+++ b/src/player/Thread.cxx
@@ -380,7 +380,7 @@ Player::ActivateDecoder()
song = pc.next_song;
pc.next_song = nullptr;
- elapsed_time = SongTime::zero();
+ elapsed_time = pc.seek_time;
/* set the "starting" flag, which will be cleared by
player_check_decoder_startup() */
@@ -948,7 +948,6 @@ Player::Run()
pc.Lock();
pc.state = PlayerState::PLAY;
- elapsed_time = pc.seek_time;
pc.CommandFinished();