diff options
author | jcoalson <jcoalson> | 2002-11-21 06:41:46 +0000 |
---|---|---|
committer | jcoalson <jcoalson> | 2002-11-21 06:41:46 +0000 |
commit | 8064c957134b3058df968884daadbc7bf52c0f38 (patch) | |
tree | 72e61940aa81c934684197f22c7ff147195c5547 /src/libFLAC/format.c | |
parent | 60c33869e6d2f4708b218e7756a973d038227708 (diff) | |
download | flac-arm-1.1.3-8064c957134b3058df968884daadbc7bf52c0f38.tar.gz |
more checks in the cuesheet validator
Diffstat (limited to 'src/libFLAC/format.c')
-rw-r--r-- | src/libFLAC/format.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/libFLAC/format.c b/src/libFLAC/format.c index 81d00e72..62839797 100644 --- a/src/libFLAC/format.c +++ b/src/libFLAC/format.c @@ -277,14 +277,16 @@ FLAC_API FLAC__bool FLAC__format_cuesheet_is_legal(const FLAC__StreamMetadata_Cu return false; } - if(cue_sheet->tracks[i].num_indices == 0) { - if(violation) *violation = "cue sheet track must have at least one index point"; - return false; - } + if(i < cue_sheet->num_tracks - 1) { + if(cue_sheet->tracks[i].num_indices == 0) { + if(violation) *violation = "cue sheet track must have at least one index point"; + return false; + } - if(cue_sheet->tracks[i].indices[0].number > 1) { - if(violation) *violation = "cue sheet track's first index number must be 0 or 1"; - return false; + if(cue_sheet->tracks[i].indices[0].number > 1) { + if(violation) *violation = "cue sheet track's first index number must be 0 or 1"; + return false; + } } for(j = 0; j < cue_sheet->tracks[i].num_indices; j++) { |