diff options
author | Max Kellermann <max@duempel.org> | 2015-11-05 00:30:04 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-11-05 00:30:04 +0100 |
commit | e6b37703daf859383358f409fab9fafdb4873a1d (patch) | |
tree | 28280a4a6b3e03d703c8bf77090a1ccd1a9cfaf4 /src | |
parent | 990f473bb3b590de34931c9dfa485e2a33d832fd (diff) | |
download | mpd-e6b37703daf859383358f409fab9fafdb4873a1d.tar.gz mpd-e6b37703daf859383358f409fab9fafdb4873a1d.tar.xz mpd-e6b37703daf859383358f409fab9fafdb4873a1d.zip |
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')
-rw-r--r-- | src/player/Thread.cxx | 3 |
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(); |