mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-20 05:46:57 +00:00
alac: fix nb_samples < order case
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
eb3dc23705
commit
fd4f4923cc
@ -224,7 +224,7 @@ static void lpc_prediction(int32_t *error_buffer, int32_t *buffer_out,
|
||||
}
|
||||
|
||||
/* read warm-up samples */
|
||||
for (i = 1; i <= lpc_order; i++)
|
||||
for (i = 1; i <= lpc_order && i < nb_samples; i++)
|
||||
buffer_out[i] = sign_extend(buffer_out[i - 1] + error_buffer[i], bps);
|
||||
|
||||
/* NOTE: 4 and 8 are very common cases that could be optimized. */
|
||||
|
Loading…
Reference in New Issue
Block a user