mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
Fix an overflow in the predictor.
fixes issue 636 Patch by Jai. Originally committed as revision 16007 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6e74619e5e
commit
3d5e1bfb20
@ -253,7 +253,8 @@ static void alac_linear_predictor(AlacEncodeContext *s, int ch)
|
|||||||
|
|
||||||
sum >>= lpc.lpc_quant;
|
sum >>= lpc.lpc_quant;
|
||||||
sum += samples[0];
|
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];
|
res_val = residual[i];
|
||||||
|
|
||||||
if(res_val) {
|
if(res_val) {
|
||||||
|
Loading…
Reference in New Issue
Block a user