mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
fix bug with -S # where the sample number >= total samples, is not getting converted to a placeholder point
This commit is contained in:
@@ -86,7 +86,10 @@ FLAC__bool grabbag__seektable_convert_specification_to_template(const char *spec
|
|||||||
#else
|
#else
|
||||||
const FLAC__int64 n = (FLAC__int64)strtoll(pt, &endptr, 10);
|
const FLAC__int64 n = (FLAC__int64)strtoll(pt, &endptr, 10);
|
||||||
#endif
|
#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))
|
if(!FLAC__metadata_object_seektable_template_append_point(seektable_template, (FLAC__uint64)n))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user