1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

swr/resample: fix integer overflow, add missing cast

The effects of this are limited to numeric errors in the output

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-02-04 03:53:10 +01:00
parent 91debec976
commit b8c55590d5

View File

@ -151,7 +151,7 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int
break; break;
}else if(sample_index < 0){ }else if(sample_index < 0){
for(i=0; i<c->filter_length; i++) 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){ }else if(c->linear){
FELEM2 v2=0; FELEM2 v2=0;
for(i=0; i<c->filter_length; i++){ for(i=0; i<c->filter_length; i++){