From b7d1a5059a88b0870348757150ae73a8b525808f Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 13 Dec 2020 09:51:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E9=AB=98rtmp=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7?= 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 55f45092..427510a1 100644 --- a/src/Rtmp/RtmpProtocol.cpp +++ b/src/Rtmp/RtmpProtocol.cpp @@ -601,7 +601,9 @@ const char* RtmpProtocol::handle_rtmp(const char *data, uint64_t len) { //need more data return ptr; } - chunk_data.buffer.append(ptr + header_len + offset, more); + if (more) { + chunk_data.buffer.append(ptr + header_len + offset, more); + } ptr += header_len + offset + more; len -= header_len + offset + more; if (chunk_data.buffer.size() == chunk_data.body_size) {