From c1c8d496a40e60e7c1d056a799989fed30805dcd Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Thu, 26 Sep 2002 04:42:10 +0000 Subject: [PATCH] new #define FLAC__SUBSET_MAX_RICE_PARTITION_ORDER --- include/FLAC/format.h | 3 +++ src/libFLAC/stream_encoder.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/FLAC/format.h b/include/FLAC/format.h index 6a56f83..8d76ec0 100644 --- a/include/FLAC/format.h +++ b/include/FLAC/format.h @@ -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 diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c index f69e45b..1c75d9a 100644 --- a/src/libFLAC/stream_encoder.c +++ b/src/libFLAC/stream_encoder.c @@ -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; } -- 2.7.4