swresample: fix negative rematrix volumns
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 22 Jul 2013 01:24:22 +0000 (03:24 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 22 Jul 2013 01:24:22 +0000 (03:24 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/rematrix.c

index 33e2966..f13c240 100644 (file)
@@ -313,7 +313,7 @@ av_cold static int auto_matrix(SwrContext *s)
     } else
         maxval = INT_MAX;
 
-    if(maxcoef > maxval){
+    if(maxcoef > maxval || s->rematrix_volume  < 0){
         maxcoef /= maxval;
         for(i=0; i<SWR_CH_MAX; i++)
             for(j=0; j<SWR_CH_MAX; j++){