Commit e847ddf0 authored by Max Kellermann's avatar Max Kellermann

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.
parent 7e8b4489
...@@ -11,6 +11,8 @@ ver 0.20.2 (not yet released) ...@@ -11,6 +11,8 @@ ver 0.20.2 (not yet released)
- alsa: fix the DSD_U32 byte order - alsa: fix the DSD_U32 byte order
- alsa: support DSD_U16 - alsa: support DSD_U16
- recorder: fix error "Failed to create : No such file or directory" - recorder: fix error "Failed to create : No such file or directory"
* playlist
- cue: fix skipping songs
ver 0.20.1 (2017/01/09) ver 0.20.1 (2017/01/09)
* input * input
......
...@@ -146,7 +146,9 @@ public: ...@@ -146,7 +146,9 @@ public:
*/ */
gcc_pure gcc_pure
bool IsSame(const DetachedSong &other) const { 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 gcc_pure gcc_nonnull_all
......
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