summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-11-27 14:04:16 +0000
committerMans Rullgard <mans@mansr.com>2011-12-11 18:47:19 +0000
commit3383a53e7d0abb9639c3ea3481f0eda9dca61a26 (patch)
treed53f0c38d95d4256b727dc4f4c5add488aabe501 /libavformat/matroskadec.c
parent5b3265a7181889b53ff8217c1bdccdf966c86955 (diff)
lavu: replace int/float punning functions
The existing functions defined in intfloat_readwrite.[ch] are both slow and incorrect (infinities are not handled). This introduces a new header with fast, inline conversion functions using direct union punning assuming an IEEE-754 system, an assumption already made throughout the code. The one use of Intel/Motorola extended 80-bit format is replaced by simpler code sufficient under the present constraints (positive normal values). The old functions are marked deprecated and retained for compatibility. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index b61c819ce3..2684d6e6d9 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -38,7 +38,7 @@
#include "rm.h"
#include "matroska.h"
#include "libavcodec/mpeg4audio.h"
-#include "libavutil/intfloat_readwrite.h"
+#include "libavutil/intfloat.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/avstring.h"
#include "libavutil/lzo.h"
@@ -624,9 +624,9 @@ static int ebml_read_float(AVIOContext *pb, int size, double *num)
if (size == 0) {
*num = 0;
} else if (size == 4) {
- *num= av_int2flt(avio_rb32(pb));
- } else if(size==8){
- *num= av_int2dbl(avio_rb64(pb));
+ *num = av_int2float(avio_rb32(pb));
+ } else if (size == 8){
+ *num = av_int2double(avio_rb64(pb));
} else
return AVERROR_INVALIDDATA;