diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-10 17:14:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-10 17:14:04 +0100 |
commit | fd4f4923cce6a2cbf4f48640b4ac706e614a1594 (patch) | |
tree | 010d40fcaf93f30f1b34db2d648bee7e202cb530 /libavcodec/alac.c | |
parent | eb3dc237051242d28570c2fa13108c05793f5a4e (diff) | |
download | ffmpeg-fd4f4923cce6a2cbf4f48640b4ac706e614a1594.tar.gz |
alac: fix nb_samples < order case
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/alac.c')
-rw-r--r-- | libavcodec/alac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c index 5653e9aff5..f032ceb9cc 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -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. */ |