quick fix for SF#1601812 where an error of exactly 0 (very rare) in FLAC__lpc_compute_lp_coefficients() could cause an infinite loop later in FLAC__lpc_quantize_coefficients()

This commit is contained in:
Josh Coalson
2006-11-27 16:27:41 +00:00
parent d9ac0bd63a
commit 32b9baedb4
3 changed files with 13 additions and 6 deletions

View File

@@ -3532,7 +3532,7 @@ FLAC__bool process_subframe_(
encoder->private_->local_lpc_compute_autocorrelation(encoder->private_->windowed_signal, frame_header->blocksize, max_lpc_order+1, autoc);
/* if autoc[0] == 0.0, the signal is constant and we usually won't get here, but it can happen */
if(autoc[0] != 0.0) {
FLAC__lpc_compute_lp_coefficients(autoc, max_lpc_order, encoder->private_->lp_coeff, lpc_error);
FLAC__lpc_compute_lp_coefficients(autoc, &max_lpc_order, encoder->private_->lp_coeff, lpc_error);
if(encoder->protected_->do_exhaustive_model_search) {
min_lpc_order = 1;
}