diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index d656fb3a..3c0afeb2 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -733,8 +733,7 @@ func C_SendConnectPacket(r *C_RTMP, cp *C_RTMPPacket) int { packet.m_nTimeStamp = 0 packet.m_nInfoField2 = 0 packet.m_hasAbsTimestamp = 0 - packet.m_body = (*byte)(incBytePtr(unsafe.Pointer(&pbuf[0]), - RTMP_MAX_HEADER_SIZE)) + packet.m_body = &pbuf[RTMP_MAX_HEADER_SIZE] enc = (*byte)(unsafe.Pointer(packet.m_body)) @@ -871,8 +870,7 @@ func C_RTMP_SendCreateStream(r *C_RTMP) int32 { packet.m_nTimeStamp = 0 packet.m_nInfoField2 = 0 packet.m_hasAbsTimestamp = 0 - packet.m_body = (*byte)(incBytePtr(unsafe.Pointer(&pbuf[0]), - int(RTMP_MAX_HEADER_SIZE))) + packet.m_body = &pbuf[RTMP_MAX_HEADER_SIZE] enc = (*byte)(unsafe.Pointer(packet.m_body)) enc = C_AMF_EncodeString(enc, pend, &av_createStream) @@ -902,8 +900,7 @@ func C_SendReleaseStream(r *C_RTMP) int32 { packet.m_nTimeStamp = 0 packet.m_nInfoField2 = 0 packet.m_hasAbsTimestamp = 0 - packet.m_body = (*byte)(incBytePtr(unsafe.Pointer(&pbuf[0]), - int(RTMP_MAX_HEADER_SIZE))) + packet.m_body = &pbuf[RTMP_MAX_HEADER_SIZE] enc = (*byte)(unsafe.Pointer(packet.m_body)) enc = C_AMF_EncodeString(enc, pend, &av_releaseStream) @@ -936,8 +933,7 @@ func C_SendFCPublish(r *C_RTMP) int32 { packet.m_nTimeStamp = 0 packet.m_nInfoField2 = 0 packet.m_hasAbsTimestamp = 0 - packet.m_body = (*byte)(incBytePtr(unsafe.Pointer(&pbuf[0]), - int(RTMP_MAX_HEADER_SIZE))) + packet.m_body = &pbuf[RTMP_MAX_HEADER_SIZE] enc = (*byte)(unsafe.Pointer(packet.m_body)) enc = C_AMF_EncodeString(enc, pend, &av_FCPublish) @@ -1006,8 +1002,7 @@ func C_SendPublish(r *C_RTMP) int32 { packet.m_nTimeStamp = 0 packet.m_nInfoField2 = int32(r.m_stream_id) packet.m_hasAbsTimestamp = 0 - packet.m_body = (*byte)(incBytePtr(unsafe.Pointer(&pbuf[0]), - int(RTMP_MAX_HEADER_SIZE))) + packet.m_body = &pbuf[RTMP_MAX_HEADER_SIZE] enc = (*byte)(unsafe.Pointer(packet.m_body)) enc = C_AMF_EncodeString(enc, pend, &av_publish) @@ -1045,8 +1040,7 @@ func C_SendBytesReceived(r *C_RTMP) int { packet.m_nTimeStamp = 0 packet.m_nInfoField2 = 0 packet.m_hasAbsTimestamp = 0 - packet.m_body = (*byte)(incBytePtr(unsafe.Pointer(&pbuf[0]), - RTMP_MAX_HEADER_SIZE)) + packet.m_body = &pbuf[RTMP_MAX_HEADER_SIZE] packet.m_nBodySize = 4 @@ -1072,8 +1066,7 @@ func C_SendCheckBW(r *C_RTMP) int32 { packet.m_nTimeStamp = 0 packet.m_nInfoField2 = 0 packet.m_hasAbsTimestamp = 0 - packet.m_body = (*byte)(incBytePtr(unsafe.Pointer(&pbuf[0]), - int(RTMP_MAX_HEADER_SIZE))) + packet.m_body = &pbuf[RTMP_MAX_HEADER_SIZE] enc = (*byte)(unsafe.Pointer(packet.m_body)) enc = C_AMF_EncodeString(enc, pend, &av__checkbw)