[FFmpeg-cvslog] alacenc: Fix missing sign_extend()

Michael Niedermayer git at videolan.org
Thu Jun 13 00:25:46 CEST 2013


ffmpeg | branch: release/0.11 | Michael Niedermayer <michaelni at gmx.at> | Thu Jun 13 00:01:13 2013 +0200| [7a472e0da964d9157bb25e90a4717093498f3f7d] | committer: Carl Eugen Hoyos

alacenc: Fix missing sign_extend()

Fixes ticket #2497

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 8aea2f05dc56f7e7d60767dd27ba8e846a05e8ae)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a472e0da964d9157bb25e90a4717093498f3f7d
---

 libavcodec/alacenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index 0194e2f..d7da936 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++) {



More information about the ffmpeg-cvslog mailing list