Browse Source

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>
Michael Niedermayer 12 years ago
parent
commit
b8c55590d5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libswresample/resample_template.c

+ 1 - 1
libswresample/resample_template.c

@@ -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++){