Commit 9a6c528e authored by Justin Ruggles's avatar Justin Ruggles

alac: factor out output_size check in predictor_decompress_fir_adapt()

parent ebd4c3ad
......@@ -173,10 +173,10 @@ static void predictor_decompress_fir_adapt(int32_t *error_buffer,
/* first sample always copies */
*buffer_out = *error_buffer;
if (!predictor_coef_num) {
if (output_size <= 1)
return;
if (output_size <= 1)
return;
if (!predictor_coef_num) {
memcpy(&buffer_out[1], &error_buffer[1],
(output_size - 1) * sizeof(*buffer_out));
return;
......@@ -184,8 +184,6 @@ static void predictor_decompress_fir_adapt(int32_t *error_buffer,
if (predictor_coef_num == 31) {
/* simple 1st-order prediction */
if (output_size <= 1)
return;
for (i = 1; i < output_size; i++) {
buffer_out[i] = sign_extend(buffer_out[i - 1] + error_buffer[i],
readsamplesize);
......
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