diff options
Diffstat (limited to 'src/playlist/cue')
-rw-r--r-- | src/playlist/cue/CueParser.cxx | 9 | ||||
-rw-r--r-- | src/playlist/cue/CueParser.hxx | 6 |
2 files changed, 3 insertions, 12 deletions
diff --git a/src/playlist/cue/CueParser.cxx b/src/playlist/cue/CueParser.cxx index e0c84a01e..81797fe28 100644 --- a/src/playlist/cue/CueParser.cxx +++ b/src/playlist/cue/CueParser.cxx @@ -250,7 +250,6 @@ CueParser::Feed2(char *p) song_tag = header_tag; song_tag.AddItem(TAG_TRACK, nr); - last_updated = false; } else if (state == IGNORE_TRACK) { return; } else if (state == TRACK && strcmp(command, "INDEX") == 0) { @@ -266,14 +265,12 @@ CueParser::Feed2(char *p) if (position_ms < 0) return; - if (!last_updated && previous != nullptr && - previous->GetStartTime().ToMS() < (unsigned)position_ms) { - last_updated = true; + if (previous != nullptr && previous->GetStartTime().ToMS() < (unsigned)position_ms) previous->SetEndTime(SongTime::FromMS(position_ms)); - } current->SetStartTime(SongTime::FromMS(position_ms)); - state = IGNORE_TRACK; + if(strcmp(nr, "00") != 0 || previous == nullptr) + state = IGNORE_TRACK; } } diff --git a/src/playlist/cue/CueParser.hxx b/src/playlist/cue/CueParser.hxx index 07010f7c4..925f1234c 100644 --- a/src/playlist/cue/CueParser.hxx +++ b/src/playlist/cue/CueParser.hxx @@ -89,12 +89,6 @@ class CueParser { DetachedSong *finished; /** - * Set to true after previous.end_time has been updated to the - * start time of the current song. - */ - bool last_updated; - - /** * Tracks whether cue_parser_finish() has been called. If * true, then all remaining (partial) results will be * delivered by cue_parser_get(). |