]> git.sesse.net Git - ffmpeg/commitdiff
swr/resample: fix integer overflow, add missing cast
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 4 Feb 2013 02:53:10 +0000 (03:53 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 4 Feb 2013 03:05:59 +0000 (04:05 +0100)
The effects of this are limited to numeric errors in the output

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/resample_template.c

index b62901d69d8d6a625951251f987e84906c9ef060..5bc12bcb712da98a39bfed7ba53d92a2b1106db3 100644 (file)
@@ -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++){