From e847ddf0110d498764e179ba7958253eecaece64 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 15 Jan 2017 00:54:09 +0100 Subject: [PATCH] DetachedSong: compare start_time and end_time in IsSame() This method is used by DecoderControl::IsCurrentSong(), which is used by the player thread to check whether the current decoder instance can be reused to seek. When switching to another song in the same CUE sheet, previously DetachedSong::IsSame() returned true, and thus the old decoder instance was used for the new song, not considering the new end_time. This led to the old decoder quickly quitting. --- NEWS | 2 ++ src/DetachedSong.hxx | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ff0443739..2f0809f91 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ ver 0.20.2 (not yet released) - alsa: fix the DSD_U32 byte order - alsa: support DSD_U16 - recorder: fix error "Failed to create : No such file or directory" +* playlist + - cue: fix skipping songs ver 0.20.1 (2017/01/09) * input diff --git a/src/DetachedSong.hxx b/src/DetachedSong.hxx index 3fea20939..c33112443 100644 --- a/src/DetachedSong.hxx +++ b/src/DetachedSong.hxx @@ -146,7 +146,9 @@ public: */ gcc_pure bool IsSame(const DetachedSong &other) const { - return uri == other.uri; + return uri == other.uri && + start_time == other.start_time && + end_time == other.end_time; } gcc_pure gcc_nonnull_all