From 19050f74eaa1aa6d609ca065e1a854ada5bb6b4c Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Sat, 4 Feb 2012 13:01:02 +1100 Subject: [PATCH] Cuesheet patch from Earl Chew. When reading the INDEX from the cue sheet, the format MM:SS:FF format is disallowed if the sample frequency is not a multiple of 75 because the index would only be approximate. However, 00:00:00 is _exact_ because it denotes the start of the track, so allow it as a special case. --- src/share/grabbag/cuesheet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/share/grabbag/cuesheet.c b/src/share/grabbag/cuesheet.c index 0299cba..fb62a6b 100644 --- a/src/share/grabbag/cuesheet.c +++ b/src/share/grabbag/cuesheet.c @@ -369,7 +369,8 @@ static FLAC__bool local__cuesheet_parse_(FILE *file, const char **error_message, } } } - else if(sample_rate % 75) { + else if(sample_rate % 75 && xx) { + /* only sample zero is exact */ *error_message = "illegal INDEX offset (MM:SS:FF form not allowed if sample rate is not a multiple of 75)"; return false; } -- 2.7.4