[FFmpeg-cvslog] Remove pointless if.

Reimar Döffinger git at videolan.org
Sun Sep 7 11:32:41 CEST 2014


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sat Sep  6 21:18:58 2014 +0200| [284123d7fd8e78a7daa948b662e65eda3b33fce2] | committer: Reimar Döffinger

Remove pointless if.

A branch to avoid some calculation seems unlikely to have any benefits.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=284123d7fd8e78a7daa948b662e65eda3b33fce2
---

 libswresample/rematrix.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index 62662f8..5da3056 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -304,9 +304,7 @@ av_cold static int auto_matrix(SwrContext *s)
                 s->matrix[out_i][in_i]= matrix[i][j];
             else
                 s->matrix[out_i][in_i]= i == j && (in_ch_layout & out_ch_layout & (1ULL<<i));
-            if(s->matrix[out_i][in_i]){
-                sum += fabs(s->matrix[out_i][in_i]);
-            }
+            sum += fabs(s->matrix[out_i][in_i]);
             if(in_ch_layout & (1ULL<<j))
                 in_i++;
         }



More information about the ffmpeg-cvslog mailing list