aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
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:04:23 +0200
commitbc4dc32b2a4086ae4e5159ac6ec1897a3b9a9a31 (patch)
treef4ce6a921a5043d03b121b299657bf29a514e567 /libavcodec
parent01580c0955f9fba6a1a04b85eaa2f2ec5e234bf6 (diff)
downloadffmpeg-bc4dc32b2a4086ae4e5159ac6ec1897a3b9a9a31.tar.gz
alacenc: Fix missing sign_extend()
Fixes ticket #2497 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 8aea2f05dc56f7e7d60767dd27ba8e846a05e8ae)
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/alacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index 71e2a74822..5354d0b940 100644
--- a/libavcodec/alacenc.c
+++ b/libavcodec/alacenc.c
@@ -275,7 +275,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++) {