new #define FLAC__SUBSET_MAX_RICE_PARTITION_ORDER

This commit is contained in:
Josh Coalson
2002-09-26 04:42:10 +00:00
parent 82738b303c
commit c1c8d496a4
2 changed files with 4 additions and 1 deletions

View File

@@ -120,6 +120,9 @@ extern "C" {
/** The maximum Rice partition order permitted by the format. */
#define FLAC__MAX_RICE_PARTITION_ORDER (15u)
/** The maximum Rice partition order permitted by the FLAC Subset. */
#define FLAC__SUBSET_MAX_RICE_PARTITION_ORDER (8u)
/** The version string of the release, stamped onto the libraries and binaries.
*
* \note

View File

@@ -637,7 +637,7 @@ FLAC__StreamEncoderState FLAC__stream_encoder_init(FLAC__StreamEncoder *encoder)
encoder->protected_->bits_per_sample != 24
)
return encoder->protected_->state = FLAC__STREAM_ENCODER_NOT_STREAMABLE;
if(encoder->protected_->max_residual_partition_order > 8)
if(encoder->protected_->max_residual_partition_order > FLAC__SUBSET_MAX_RICE_PARTITION_ORDER)
return encoder->protected_->state = FLAC__STREAM_ENCODER_NOT_STREAMABLE;
}