diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-06-13 00:01:13 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-06-13 00:08:02 +0200 |
commit | 194590dc56c4524f602ee5fd592374495627018d (patch) | |
tree | 6139fd0806b75e9e4f1958343e908fa30b2f530e | |
parent | be66531ee27cce11b3baa9c7be3e3fb2f89fe6af (diff) | |
download | ffmpeg-194590dc56c4524f602ee5fd592374495627018d.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c index 79b6ba8dd8..c472ad95af 100644 --- a/libavcodec/alacenc.c +++ b/libavcodec/alacenc.c @@ -262,7 +262,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++) { |