diff options
author | Mans Rullgard <mans@mansr.com> | 2011-11-27 14:04:16 +0000 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-12-11 18:47:19 +0000 |
commit | 3383a53e7d0abb9639c3ea3481f0eda9dca61a26 (patch) | |
tree | d53f0c38d95d4256b727dc4f4c5add488aabe501 /libavformat/rtmpproto.c | |
parent | 5b3265a7181889b53ff8217c1bdccdf966c86955 (diff) | |
download | ffmpeg-3383a53e7d0abb9639c3ea3481f0eda9dca61a26.tar.gz |
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/rtmpproto.c')
-rw-r--r-- | libavformat/rtmpproto.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 69acd864dc..53d912e3c6 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -26,7 +26,7 @@ #include "libavcodec/bytestream.h" #include "libavutil/avstring.h" -#include "libavutil/intfloat_readwrite.h" +#include "libavutil/intfloat.h" #include "libavutil/lfg.h" #include "libavutil/sha.h" #include "avformat.h" @@ -615,7 +615,7 @@ static int rtmp_parse_result(URLContext *s, RTMPContext *rt, RTMPPacket *pkt) /* hack for Wowza Media Server, it does not send result for * releaseStream and FCPublish calls */ if (!pkt->data[10]) { - int pkt_id = (int) av_int2dbl(AV_RB64(pkt->data + 11)); + int pkt_id = av_int2double(AV_RB64(pkt->data + 11)); if (pkt_id == rt->create_stream_invoke) rt->state = STATE_CONNECTING; } @@ -626,7 +626,7 @@ static int rtmp_parse_result(URLContext *s, RTMPContext *rt, RTMPPacket *pkt) if (pkt->data[10] || pkt->data[19] != 5 || pkt->data[20]) { av_log(s, AV_LOG_WARNING, "Unexpected reply on connect()\n"); } else { - rt->main_channel_id = (int) av_int2dbl(AV_RB64(pkt->data + 21)); + rt->main_channel_id = av_int2double(AV_RB64(pkt->data + 21)); } if (rt->is_input) { gen_play(s, rt); |