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:
@@ -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
|
||||
|
Reference in New Issue
Block a user