summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-09-20 18:23:08 +0000
committerMichael Niedermayer <michaelni@gmx.at>2014-09-20 20:45:57 +0200
commita0844935354bc210ecb042101aa9985ed5de975e (patch)
tree7527b68158021c1953386281d3f518953da54f65
parentd87fe2687fdc5b1cb9aaec957afadb56d207618f (diff)
alacenc: fix incorrect buffer use
The issue lies in actually dead code ("for now it's not used"). Noticed-by: Justin Ruggles Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/alacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index b9ad899e16..fd5bf66005 100644
--- a/libavcodec/alacenc.c
+++ b/libavcodec/alacenc.c
@@ -444,7 +444,7 @@ static void write_element(AlacEncodeContext *s,
// TODO: determine when this will actually help. for now it's not used.
if (prediction_type == 15) {
// 2nd pass 1st order filter
- int32_t *residual = s->predictor_buf[channels];
+ int32_t *residual = s->predictor_buf[i];
for (j = s->frame_size - 1; j > 0; j--)
residual[j] -= residual[j - 1];
}