From 0edd569466eb45b134690b9f4efbb57eda86f58d Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sun, 13 Nov 2016 20:52:02 +0100 Subject: softfloat: handle -INT_MAX correctly This is similar to commit 9ac61e73d0843ec4b83f4e3d47eded73234e406e. Reviewed-by: Michael Niedermayer Signed-off-by: Andreas Cadhalpun --- libavutil/softfloat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavutil/softfloat.h') diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h index a3b2238..48d0d59 100644 --- a/libavutil/softfloat.h +++ b/libavutil/softfloat.h @@ -175,7 +175,7 @@ static inline av_const SoftFloat av_sub_sf(SoftFloat a, SoftFloat b){ */ static inline av_const SoftFloat av_int2sf(int v, int frac_bits){ int exp_offset = 0; - if(v == INT_MIN){ + if(v <= INT_MIN + 1){ exp_offset = 1; v>>=1; } -- cgit v1.1