mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
more checks in the cuesheet validator
This commit is contained in:
@@ -277,14 +277,16 @@ FLAC_API FLAC__bool FLAC__format_cuesheet_is_legal(const FLAC__StreamMetadata_Cu
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cue_sheet->tracks[i].num_indices == 0) {
|
if(i < cue_sheet->num_tracks - 1) {
|
||||||
if(violation) *violation = "cue sheet track must have at least one index point";
|
if(cue_sheet->tracks[i].num_indices == 0) {
|
||||||
return false;
|
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(cue_sheet->tracks[i].indices[0].number > 1) {
|
||||||
if(violation) *violation = "cue sheet track's first index number must be 0 or 1";
|
if(violation) *violation = "cue sheet track's first index number must be 0 or 1";
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(j = 0; j < cue_sheet->tracks[i].num_indices; j++) {
|
for(j = 0; j < cue_sheet->tracks[i].num_indices; j++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user