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.
This commit is contained in:
parent
7e8b448985
commit
e847ddf011
2
NEWS
2
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue