From e6b37703daf859383358f409fab9fafdb4873a1d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Nov 2015 00:30:04 +0100 Subject: 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. --- src/player/Thread.cxx | 3 +-- 1 file changed, 1 insertion(+), 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(); -- cgit v1.2.3