[FFmpeg-cvslog] softfloat: handle -INT_MAX correctly

Andreas Cadhalpun git at videolan.org
Sun Nov 27 01:48:29 EET 2016


ffmpeg | branch: release/2.8 | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Sun Nov 13 20:52:02 2016 +0100| [ccda73a711ba0d194e97fac476f9676183281ae7] | committer: Andreas Cadhalpun

softfloat: handle -INT_MAX correctly

This is similar to commit 9ac61e73d0843ec4b83f4e3d47eded73234e406e.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
(cherry picked from commit 0edd569466eb45b134690b9f4efbb57eda86f58d)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

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

 libavutil/softfloat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h
index 7488753..c7b5a78 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;
     }



More information about the ffmpeg-cvslog mailing list