diff options
author | Michael Niedermayer <[email protected]> | 2013-06-13 00:01:13 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <[email protected]> | 2013-06-13 00:11:02 +0200 |
commit | 7a472e0da964d9157bb25e90a4717093498f3f7d (patch) | |
tree | 84a0972ad5942f02563e8bc852cc49640757b5c6 | |
parent | f6bca606f17640e835c1f264c1c45625008eb3e6 (diff) |
alacenc: Fix missing sign_extend()
Fixes ticket #2497
Signed-off-by: Michael Niedermayer <[email protected]>
(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 0194e2fecc..d7da9369eb 100644 --- a/libavcodec/alacenc.c +++ b/libavcodec/alacenc.c @@ -264,7 +264,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++) { |