Browse code

avfilter/af_afade: use av_clipd() instead of nested FFMAX & FFMIN

Signed-off-by: Paul B Mahol <onemda@gmail.com>

Paul B Mahol authored on 2015/06/15 02:08:43
Showing 1 changed files
... ...
@@ -124,7 +124,7 @@ static double fade_gain(int curve, int64_t index, int range)
124 124
 {
125 125
     double gain;
126 126
 
127
-    gain = FFMAX(0.0, FFMIN(1.0, 1.0 * index / range));
127
+    gain = av_clipd(1.0 * index / range, 0, 1.0);
128 128
 
129 129
     switch (curve) {
130 130
     case QSIN: