From fb17dd8e875bd14a58559860c20ca4c77d30afaf Mon Sep 17 00:00:00 2001 From: langhuihui <178529795@qq.com> Date: Wed, 30 Sep 2020 22:04:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA=E5=86=85?= =?UTF-8?q?=E5=AD=98=E6=B3=84=E6=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netConnection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netConnection.go b/netConnection.go index 34542c7..4f2e964 100644 --- a/netConnection.go +++ b/netConnection.go @@ -439,7 +439,7 @@ func (conn *NetConnection) readChunk() (msg *Chunk, err error) { } msgLen := int(chunkHead.MessageLength) if !ok { - currentBody = (pool.GetSlice(msgLen))[:0] + currentBody = make([]byte,0,msgLen) conn.incompleteRtmpBody[ChunkStreamID] = currentBody }