player/Thread: clear pc.next_song earlier in WaitForDecoder()
This commit is contained in:
parent
b78896d64e
commit
efd871ad2f
@ -369,6 +369,8 @@ Player::WaitForDecoder()
|
|||||||
|
|
||||||
delete song;
|
delete song;
|
||||||
song = pc.next_song;
|
song = pc.next_song;
|
||||||
|
pc.next_song = nullptr;
|
||||||
|
|
||||||
elapsed_time = SongTime::zero();
|
elapsed_time = SongTime::zero();
|
||||||
|
|
||||||
/* set the "starting" flag, which will be cleared by
|
/* set the "starting" flag, which will be cleared by
|
||||||
@ -376,13 +378,10 @@ Player::WaitForDecoder()
|
|||||||
decoder_starting = true;
|
decoder_starting = true;
|
||||||
|
|
||||||
/* update PlayerControl's song information */
|
/* update PlayerControl's song information */
|
||||||
pc.total_time = pc.next_song->GetDuration();
|
pc.total_time = song->GetDuration();
|
||||||
pc.bit_rate = 0;
|
pc.bit_rate = 0;
|
||||||
pc.audio_format.Clear();
|
pc.audio_format.Clear();
|
||||||
|
|
||||||
/* clear the queued song */
|
|
||||||
pc.next_song = nullptr;
|
|
||||||
|
|
||||||
pc.Unlock();
|
pc.Unlock();
|
||||||
|
|
||||||
/* call syncPlaylistWithQueue() in the main thread */
|
/* call syncPlaylistWithQueue() in the main thread */
|
||||||
|
Loading…
Reference in New Issue
Block a user