Mercurial > libavcodec.hg
changeset 8261:5f48c58bfd51 libavcodec
Fix an overflow in the predictor.
fixes issue 636
Patch by Jai.
author | benoit |
---|---|
date | Fri, 05 Dec 2008 07:58:31 +0000 |
parents | 8aa88616d6d8 |
children | f0bf2db65dc3 |
files | alacenc.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/alacenc.c Thu Dec 04 20:24:22 2008 +0000 +++ b/alacenc.c Fri Dec 05 07:58:31 2008 +0000 @@ -253,7 +253,8 @@ 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) {