diff --git a/lib/rtmpchunks.cpp b/lib/rtmpchunks.cpp index 6aa5f242..51a2e9dd 100644 --- a/lib/rtmpchunks.cpp +++ b/lib/rtmpchunks.cpp @@ -13,7 +13,7 @@ std::string RTMPStream::handshake_out;///< Output for the handshake. unsigned int RTMPStream::getNowMS(){ timeval t; gettimeofday(&t, 0); - return t.tv_sec + t.tv_usec/1000; + return t.tv_sec * 1000 + t.tv_usec/1000; }//RTMPStream::getNowMS @@ -27,7 +27,6 @@ unsigned int RTMPStream::rec_cnt = 0; unsigned int RTMPStream::snd_cnt = 0; timeval RTMPStream::lastrec; -unsigned int RTMPStream::firsttime; /// Holds the last sent chunk for every msg_id. std::map RTMPStream::Chunk::lastsend; @@ -42,7 +41,6 @@ std::string RTMPStream::Chunk::Pack(){ RTMPStream::Chunk prev = lastsend[cs_id]; unsigned int tmpi; unsigned char chtype = 0x00; - //timestamp -= firsttime; if ((prev.msg_type_id > 0) && (prev.cs_id == cs_id)){ if (msg_stream_id == prev.msg_stream_id){ chtype = 0x40;//do not send msg_stream_id diff --git a/lib/rtmpchunks.h b/lib/rtmpchunks.h index ff4eee4a..009cfd29 100644 --- a/lib/rtmpchunks.h +++ b/lib/rtmpchunks.h @@ -30,7 +30,6 @@ namespace RTMPStream{ extern unsigned int snd_cnt; ///< Counter for total data sent, in bytes. extern timeval lastrec; ///< Timestamp of last time data was received. - extern unsigned int firsttime; ///< Timestamp of first time a chunk was sent. /// Holds a single RTMP chunk, either send or receive direction. class Chunk{