fix: rtmp推拉流频繁创建内存问题

This commit is contained in:
ydajiang
2025-06-08 09:42:29 +08:00
parent 3b03420639
commit a7b233681c
2 changed files with 14 additions and 10 deletions

View File

@@ -65,11 +65,7 @@ func (s *server) OnPacket(conn net.Conn, data []byte) []byte {
_ = conn.Close()
}
if session.isPublisher {
return stream.TCPReceiveBufferPool.Get().([]byte)
}
return nil
return session.receiveBuffer
}
func NewServer() Server {