git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb3dc23
)
alac: fix nb_samples < order case
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 10 Nov 2012 16:14:04 +0000
(17:14 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 10 Nov 2012 16:14:04 +0000
(17:14 +0100)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/alac.c
patch
|
blob
|
history
diff --git
a/libavcodec/alac.c
b/libavcodec/alac.c
index
5653e9a
..
f032ceb
100644
(file)
--- 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. */