Commit b8c55590 authored by Michael Niedermayer's avatar Michael Niedermayer

swr/resample: fix integer overflow, add missing cast

The effects of this are limited to numeric errors in the output
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 91debec9
......@@ -151,7 +151,7 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int
break;
}else if(sample_index < 0){
for(i=0; i<c->filter_length; i++)
val += src[FFABS(sample_index + i)] * filter[i];
val += src[FFABS(sample_index + i)] * (FELEM2)filter[i];
}else if(c->linear){
FELEM2 v2=0;
for(i=0; i<c->filter_length; i++){
......
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