summaryrefslogtreecommitdiffstats
path: root/libavutil/intfloat_readwrite.c
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2012-04-02 01:44:30 +0200
committerMichael Niedermayer <[email protected]>2012-04-02 01:44:30 +0200
commit336d5ae37b31704509c3989c5572598267bb56ff (patch)
tree347ade43ced4892862caf4bbd33784c5c048a25a /libavutil/intfloat_readwrite.c
parente00d6e80ff62d151fb9c20336ee365ca42854a69 (diff)
parentb6cc1c77fd7d6a037c0c0c848c3621c7b1ff33b6 (diff)
Merge branch 'release/0.8' into release/0.7
* release/0.8: (182 commits) id3v2: fix skipping extended header in id3v2.4 Update RELEASE file for 0.7.5 lcl: use AVERROR_INVALIDDATA instead of AVERROR_UNKNOWN kgv1dec: Increase offsets array size so it is large enough. kgv1: use avctx->get/release_buffer(). kvmc: fix invalid reads nsvdec: Propagate error values instead of returning 0 in nsv_read_header(). mjpegbdec: Fix overflow in SOS. shorten: Use separate pointers for the allocated memory for decoded samples. shorten: check for realloc failure (cherry picked from commit 9e5e2c2d010c05c10337e9c1ec9d0d61495e0c9c) atrac3: Fix crash in tonal component decoding. ws_snd1: Fix wrong samples count and crash. ws_snd: add some checks to prevent buffer overread or overwrite. (cherry picked from commit 417364ce1f979031ef6fee661fc15e1869bdb1b4) ws_snd: decode to AV_SAMPLE_FMT_U8 instead of S16. dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2 h264: stricter reference limit enforcement. jvdec: unbreak video decoding xxan: don't read before start of buffer in av_memcpy_backptr(). dsicinvideo: validate buffer offset before copying pixels. huffyuv: add padding to classic (v1) huffman tables. ... Conflicts: Doxyfile RELEASE VERSION Merged-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'libavutil/intfloat_readwrite.c')
-rw-r--r--libavutil/intfloat_readwrite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/intfloat_readwrite.c b/libavutil/intfloat_readwrite.c
index f51d8ddd4f..991aa7886c 100644
--- a/libavutil/intfloat_readwrite.c
+++ b/libavutil/intfloat_readwrite.c
@@ -30,13 +30,13 @@
#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);
}