]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/intfloat_readwrite.c
rtp: Make sure the output format pointer is set
[ffmpeg] / libavutil / intfloat_readwrite.c
index 21a1c316673962ac1ff941717b8d7c2fdd5d3587..68385635efffbb61b47364dbc37ece92ab310d74 100644 (file)
 #include "intfloat_readwrite.h"
 
 double av_int2dbl(int64_t v){
-    if(v+v > 0xFFEULL<<52)
+    if((uint64_t)v+v > 0xFFEULL<<52)
         return NAN;
     return ldexp(((v&((1LL<<52)-1)) + (1LL<<52)) * (v>>63|1), (v>>52&0x7FF)-1075);
 }
 
 float av_int2flt(int32_t v){
-    if(v+v > 0xFF000000U)
+    if((uint32_t)v+v > 0xFF000000U)
         return NAN;
     return ldexp(((v&0x7FFFFF) + (1<<23)) * (v>>31|1), (v>>23&0xFF)-150);
 }
@@ -95,4 +95,3 @@ AVExtFloat av_dbl2ext(double d){
         ext.exponent[0] |= 0x80;
     return ext;
 }
-