avfilter/af_afade: use av_clipd() instead of nested FFMAX & FFMIN
authorPaul B Mahol <onemda@gmail.com>
Sun, 14 Jun 2015 17:08:43 +0000 (17:08 +0000)
committerPaul B Mahol <onemda@gmail.com>
Sun, 14 Jun 2015 17:08:43 +0000 (17:08 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/af_afade.c

index 8b69cef..d2c07e5 100644 (file)
@@ -124,7 +124,7 @@ static double fade_gain(int curve, int64_t index, int range)
 {
     double gain;
 
-    gain = FFMAX(0.0, FFMIN(1.0, 1.0 * index / range));
+    gain = av_clipd(1.0 * index / range, 0, 1.0);
 
     switch (curve) {
     case QSIN: