Commit ef9f7998 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

src/libFLAC/lpc.c : Restore missing conditional.

Git commit 9c2290ad in-correctly removed a conditional around
an fprintf. Thanks to mark4o on #xiph (freenode) for reporting
this.
parent 7566d3d4
...@@ -288,6 +288,7 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients(const FLAC__int32 * flac_r ...@@ -288,6 +288,7 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients(const FLAC__int32 * flac_r
for(j = 0; j < order; j++) { for(j = 0; j < order; j++) {
sum += qlp_coeff[j] * (*(--history)); sum += qlp_coeff[j] * (*(--history));
sumo += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*history); sumo += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*history);
if(sumo > 2147483647ll || sumo < -2147483648ll)
fprintf(stderr,"FLAC__lpc_compute_residual_from_qlp_coefficients: OVERFLOW, i=%u, j=%u, c=%d, d=%d, sumo=%" PRId64 "\n",i,j,qlp_coeff[j],*history,sumo); fprintf(stderr,"FLAC__lpc_compute_residual_from_qlp_coefficients: OVERFLOW, i=%u, j=%u, c=%d, d=%d, sumo=%" PRId64 "\n",i,j,qlp_coeff[j],*history,sumo);
} }
*(residual++) = *(data++) - (sum >> lp_quantization); *(residual++) = *(data++) - (sum >> lp_quantization);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment