summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Cadhalpun <[email protected]>2016-11-13 20:52:02 +0100
committerAndreas Cadhalpun <[email protected]>2016-11-27 00:38:57 +0100
commit48496e4d4fadd01ff3ce45d2540e8cf75ac5cd89 (patch)
treeae19d44581c204a284b3abe7a6827e00c5230a6a
parente93934e100d41ddb08bb85bf9023ee1716d78718 (diff)
softfloat: handle -INT_MAX correctly
This is similar to commit 9ac61e73d0843ec4b83f4e3d47eded73234e406e. Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]> (cherry picked from commit 0edd569466eb45b134690b9f4efbb57eda86f58d) Signed-off-by: Andreas Cadhalpun <[email protected]>
-rw-r--r--libavutil/softfloat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h
index 4b895f014b..df3fc798d7 100644
--- a/libavutil/softfloat.h
+++ b/libavutil/softfloat.h
@@ -155,7 +155,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;
}