diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-11-13 20:52:02 +0100 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-11-27 00:46:35 +0100 |
commit | ccda73a711ba0d194e97fac476f9676183281ae7 (patch) | |
tree | 835670333b2f70fafdf8eebbefe73a6ebcce7742 | |
parent | 0b948b1b8d100491934f00bc6d72009de0c99b05 (diff) | |
download | ffmpeg-ccda73a711ba0d194e97fac476f9676183281ae7.tar.gz |
softfloat: handle -INT_MAX correctly
This is similar to commit 9ac61e73d0843ec4b83f4e3d47eded73234e406e.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 0edd569466eb45b134690b9f4efbb57eda86f58d)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r-- | libavutil/softfloat.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h index 7488753d64..c7b5a780fe 100644 --- a/libavutil/softfloat.h +++ b/libavutil/softfloat.h @@ -154,7 +154,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; } |