diff mbox

[FFmpeg-devel] softfloat: handle -INT_MAX correctly

Message ID af4afcad-a4a9-57e7-0cd7-1b35c3c77cff@googlemail.com
State Accepted
Commit 0edd569466eb45b134690b9f4efbb57eda86f58d
Headers show

Commit Message

Andreas Cadhalpun Nov. 13, 2016, 7:55 p.m. UTC
This is similar to commit 9ac61e73d0843ec4b83f4e3d47eded73234e406e.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
---
 libavutil/softfloat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Nov. 13, 2016, 11:30 p.m. UTC | #1
On Sun, Nov 13, 2016 at 08:55:01PM +0100, Andreas Cadhalpun wrote:
> This is similar to commit 9ac61e73d0843ec4b83f4e3d47eded73234e406e.
> 
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
> ---
>  libavutil/softfloat.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

LGTM

thx

[...]
Andreas Cadhalpun Nov. 14, 2016, 9:58 p.m. UTC | #2
On 14.11.2016 00:30, Michael Niedermayer wrote:
> On Sun, Nov 13, 2016 at 08:55:01PM +0100, Andreas Cadhalpun wrote:
>> This is similar to commit 9ac61e73d0843ec4b83f4e3d47eded73234e406e.
>>
>> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
>> ---
>>  libavutil/softfloat.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> LGTM

Pushed.

Best regards,
Andreas
diff mbox

Patch

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;
     }