Commit 036e9fd0 authored by Josh Coalson's avatar Josh Coalson

fix bug with -S # where the sample number >= total samples, is not getting...

fix bug with -S # where the sample number >= total samples, is not getting converted to a placeholder point
parent c986d135
......@@ -86,7 +86,10 @@ FLAC__bool grabbag__seektable_convert_specification_to_template(const char *spec
#else
const FLAC__int64 n = (FLAC__int64)strtoll(pt, &endptr, 10);
#endif
if(n > 0 || (endptr > pt && *endptr == ';'))
if(
(n > 0 || (endptr > pt && *endptr == ';')) && /* is a valid number (extra check needed for "0") */
(total_samples_to_encode == 0 || (FLAC__uint64)n < total_samples_to_encode) /* number is not >= the known total_samples_to_encode */
)
if(!FLAC__metadata_object_seektable_template_append_point(seektable_template, (FLAC__uint64)n))
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment