修复rtmp bodySize为0崩溃的bug

This commit is contained in:
xzl 2017-05-18 09:10:22 +08:00
parent afb90f68ed
commit 6d28fff604

View File

@ -522,7 +522,9 @@ void RtmpProtocol::handle_rtmp() {
m_strRcvBuf.erase(0, iHeaderLen + iOffset + iMore); m_strRcvBuf.erase(0, iHeaderLen + iOffset + iMore);
if (chunkData.strBuf.size() == chunkData.bodySize) { if (chunkData.strBuf.size() == chunkData.bodySize) {
m_iNowStreamID = chunkData.streamId; m_iNowStreamID = chunkData.streamId;
handle_rtmpChunk(chunkData); if(chunkData.bodySize){
handle_rtmpChunk(chunkData);
}
chunkData.strBuf.clear(); chunkData.strBuf.clear();
} }
} }