max the largest metadata type code be 126, reserving 127 to avoid confusion with a frame sync code

This commit is contained in:
Josh Coalson
2004-07-22 01:32:00 +00:00
parent 5bf54f0a93
commit 1cb2341298
5 changed files with 19 additions and 7 deletions

View File

@@ -88,6 +88,9 @@ extern "C" {
format specification. There is nothing to tune here.
*/
/** The largest legal metadata type code. */
#define FLAC__MAX_METADATA_TYPE_CODE (126u)
/** The minimum block size, in samples, permitted by the format. */
#define FLAC__MIN_BLOCK_SIZE (16u)

View File

@@ -1084,7 +1084,8 @@ FLAC_API FLAC__bool FLAC__metadata_iterator_insert_block_after(FLAC__Metadata_It
*
* \param type Type of object to create
* \retval FLAC__StreamMetadata*
* \c NULL if there was an error allocating memory, else the new instance.
* \c NULL if there was an error allocating memory or the type code is
* greater than FLAC__MAX_METADATA_TYPE_CODE, else the new instance.
*/
FLAC_API FLAC__StreamMetadata *FLAC__metadata_object_new(FLAC__MetadataType type);