[FFmpeg-cvslog] avfilter/af_afade: use av_clipd() instead of nested FFMAX & FFMIN

Paul B Mahol git at videolan.org
Sun Jun 14 19:22:58 CEST 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jun 14 17:08:43 2015 +0000| [20ee65ef73b78c8acd2a036f435fe7d45338903f] | committer: Paul B Mahol

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

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

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

 libavfilter/af_afade.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c
index 8b69cef..d2c07e5 100644
--- a/libavfilter/af_afade.c
+++ b/libavfilter/af_afade.c
@@ -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:



More information about the ffmpeg-cvslog mailing list