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.
This commit is contained in:
Max Kellermann 2015-11-05 00:30:04 +01:00
parent 990f473bb3
commit e6b37703da

View File

@ -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();