diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-06 18:29:02 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-06 19:18:14 +0400 |
commit | afce8348432463e135f2de69844e55598539c6bf (patch) | |
tree | ee6eae76adf942a2c9eba9fa22ee556e65de5451 | |
parent | fa8f060b75bf9074792a0f9ff4ed002652ef62b8 (diff) |
avutil/libm: Replace macro based fminf() by function
This avoids issues when the FFMIN parameter evaluation has side effects
Reviewed-by: Clément Bœsch <u@pkh.me>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavutil/libm.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/libm.h b/libavutil/libm.h index eacb3cc42a..13e6cfe181 100644 --- a/libavutil/libm.h +++ b/libavutil/libm.h @@ -84,7 +84,10 @@ static av_always_inline float cbrtf(float x) #if !HAVE_FMINF #undef fminf -#define fminf(x, y) (FFMIN(x,y)) +static av_always_inline av_const float fminf(float x, float y) +{ + return FFMIN(x, y); +} #endif #if !HAVE_ISINF |