From 6d28fff6048296b93245a4341680fd4e9823e3e6 Mon Sep 17 00:00:00 2001 From: xzl <771730766@qq.com> Date: Thu, 18 May 2017 09:10:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Drtmp=20bodySize=E4=B8=BA0?= =?UTF-8?q?=E5=B4=A9=E6=BA=83=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtmp/RtmpProtocol.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Rtmp/RtmpProtocol.cpp b/src/Rtmp/RtmpProtocol.cpp index ac02b0a1..9cd247b9 100644 --- a/src/Rtmp/RtmpProtocol.cpp +++ b/src/Rtmp/RtmpProtocol.cpp @@ -522,7 +522,9 @@ void RtmpProtocol::handle_rtmp() { m_strRcvBuf.erase(0, iHeaderLen + iOffset + iMore); if (chunkData.strBuf.size() == chunkData.bodySize) { m_iNowStreamID = chunkData.streamId; - handle_rtmpChunk(chunkData); + if(chunkData.bodySize){ + handle_rtmpChunk(chunkData); + } chunkData.strBuf.clear(); } }