aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-13 00:01:13 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-13 00:01:13 +0200
commite22dd7fbd09d9384a08b11bafe3d1bbe0a89bf8b (patch)
tree084561cbf0846c4c49ccc71d5bd434dc8fef9f4a
parent376a9f8e6e362178c4e9d95c7d18e1775c014eb6 (diff)
downloadffmpeg-e22dd7fbd09d9384a08b11bafe3d1bbe0a89bf8b.tar.gz
alacenc: Fix missing sign_extend()
Fixes ticket #2497 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 8aea2f05dc56f7e7d60767dd27ba8e846a05e8ae)
-rw-r--r--libavcodec/alacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index 4ee558c673..83063ab0f7 100644
--- a/libavcodec/alacenc.c
+++ b/libavcodec/alacenc.c
@@ -274,7 +274,7 @@ static void alac_linear_predictor(AlacEncodeContext *s, int ch)
// generate warm-up samples
residual[0] = samples[0];
for (i = 1; i <= lpc.lpc_order; i++)
- residual[i] = samples[i] - samples[i-1];
+ residual[i] = sign_extend(samples[i] - samples[i-1], s->write_sample_size);
// perform lpc on remaining samples
for (i = lpc.lpc_order + 1; i < s->frame_size; i++) {