优化性能

This commit is contained in:
xiongziliang
2017-12-04 23:55:09 +08:00
parent 882210abd2
commit a32c97f8b5
18 changed files with 118 additions and 111 deletions

View File

@@ -221,7 +221,7 @@ void RtmpProtocol::sendRtmp(uint8_t ui8Type, uint32_t ui32StreamId,
strSend.append(strBuf, pos, chunk);
pos += chunk;
}
onSendRawData(strSend.data(),strSend.size());
onSendRawData(std::move(strSend));
m_ui32ByteSent += strSend.size();
if (m_ui32WinSize > 0 && m_ui32ByteSent - m_ui32LastSent >= m_ui32WinSize) {
m_ui32LastSent = m_ui32ByteSent;