Commit e6b37703 authored by Max Kellermann's avatar Max Kellermann

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.
parent 990f473b
...@@ -380,7 +380,7 @@ Player::ActivateDecoder() ...@@ -380,7 +380,7 @@ Player::ActivateDecoder()
song = pc.next_song; song = pc.next_song;
pc.next_song = nullptr; pc.next_song = nullptr;
elapsed_time = SongTime::zero(); elapsed_time = pc.seek_time;
/* set the "starting" flag, which will be cleared by /* set the "starting" flag, which will be cleared by
player_check_decoder_startup() */ player_check_decoder_startup() */
...@@ -948,7 +948,6 @@ Player::Run() ...@@ -948,7 +948,6 @@ Player::Run()
pc.Lock(); pc.Lock();
pc.state = PlayerState::PLAY; pc.state = PlayerState::PLAY;
elapsed_time = pc.seek_time;
pc.CommandFinished(); pc.CommandFinished();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment