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:
parent
990f473bb3
commit
e6b37703da
@ -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()
|
|||||||
|
|
||||||
pc.Lock();
|
pc.Lock();
|
||||||
pc.state = PlayerState::PLAY;
|
pc.state = PlayerState::PLAY;
|
||||||
elapsed_time = pc.seek_time;
|
|
||||||
|
|
||||||
pc.CommandFinished();
|
pc.CommandFinished();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user