Commit 876909ae authored by benoit's avatar benoit

Fix an overflow in the predictor.

fixes issue 636
Patch by Jai.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16007 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d32f77f6
......@@ -253,7 +253,8 @@ static void alac_linear_predictor(AlacEncodeContext *s, int ch)
sum >>= lpc.lpc_quant;
sum += samples[0];
residual[i] = samples[lpc.lpc_order+1] - sum;
residual[i] = (samples[lpc.lpc_order+1] - sum) << (32 - s->write_sample_size) >>
(32 - s->write_sample_size);
res_val = residual[i];
if(res_val) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment