aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-10-27 23:25:50 +0100
committerMax Kellermann <max@duempel.org>2015-10-27 23:25:50 +0100
commitefd871ad2f0b8eb776d973ca09b3c239c7502b01 (patch)
treec7a3cfb0ffd55b0c19f9611fd95e16cb5f554aa2 /src
parentb78896d64ed9e07d02d1ca95c29adc877b4e52d6 (diff)
downloadmpd-efd871ad2f0b8eb776d973ca09b3c239c7502b01.tar.gz
mpd-efd871ad2f0b8eb776d973ca09b3c239c7502b01.tar.xz
mpd-efd871ad2f0b8eb776d973ca09b3c239c7502b01.zip
player/Thread: clear pc.next_song earlier in WaitForDecoder()
Diffstat (limited to '')
-rw-r--r--src/player/Thread.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx
index 9358dc1f5..40d73a5f1 100644
--- a/src/player/Thread.cxx
+++ b/src/player/Thread.cxx
@@ -369,6 +369,8 @@ Player::WaitForDecoder()
delete song;
song = pc.next_song;
+ pc.next_song = nullptr;
+
elapsed_time = SongTime::zero();
/* set the "starting" flag, which will be cleared by
@@ -376,13 +378,10 @@ Player::WaitForDecoder()
decoder_starting = true;
/* update PlayerControl's song information */
- pc.total_time = pc.next_song->GetDuration();
+ pc.total_time = song->GetDuration();
pc.bit_rate = 0;
pc.audio_format.Clear();
- /* clear the queued song */
- pc.next_song = nullptr;
-
pc.Unlock();
/* call syncPlaylistWithQueue() in the main thread */