From 390c882792e8505d2b87d73318fae33af4392ec7 Mon Sep 17 00:00:00 2001 From: saxon Date: Sun, 2 Sep 2018 10:21:10 +0930 Subject: [PATCH] rtmp: removed comments containing previous code in C_RTMP_Write --- rtmp/rtmp.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 9e6c202b..d76fdef7 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -2127,7 +2127,6 @@ func C_RTMP_Write(r *C_RTMP, buf []byte) int { } if buf[0] == 'F' && buf[1] == 'L' && buf[2] == 'V' { - //buf = unsafe.Pointer(uintptr(buf) + uintptr(13)) buf = buf[13:] s2 -= 13 } @@ -2135,7 +2134,6 @@ func C_RTMP_Write(r *C_RTMP, buf []byte) int { pkt.m_packetType = uint8(buf[0]) buf = buf[1:] pkt.m_nBodySize = uint32(C_AMF_DecodeInt24(&buf[0])) - //buf = incBytePtr(buf, 3) buf = buf[3:] pkt.m_nTimeStamp = uint32(C_AMF_DecodeInt24(&buf[0])) buf = buf[3:] @@ -2162,7 +2160,6 @@ func C_RTMP_Write(r *C_RTMP, buf []byte) int { } enc = (*[_Gi]byte)(unsafe.Pointer(pkt.m_body))[:pkt.m_nBodySize] - //pend = incBytePtr(enc, int(pkt.m_nBodySize)) pend = enc[pkt.m_nBodySize:] if pkt.m_packetType == RTMP_PACKET_TYPE_INFO { @@ -2176,7 +2173,6 @@ func C_RTMP_Write(r *C_RTMP, buf []byte) int { } else { enc = ((*[_Gi]byte)(unsafe.Pointer(pkt.m_body))[:pkt.m_nBodySize])[pkt.m_nBytesRead:] - //enc = incBytePtr(unsafe.Pointer(pkt.m_body), int(pkt.m_nBytesRead)) } num = int(pkt.m_nBodySize - pkt.m_nBytesRead) if num > s2 { @@ -2184,10 +2180,8 @@ func C_RTMP_Write(r *C_RTMP, buf []byte) int { } copy(enc[:num], buf[:num]) - //memmove(enc, buf, uintptr(num)) pkt.m_nBytesRead += uint32(num) s2 -= num - //buf = incBytePtr(buf, num) buf = buf[num:] if pkt.m_nBytesRead == pkt.m_nBodySize { // TODO: Port this @@ -2200,7 +2194,6 @@ func C_RTMP_Write(r *C_RTMP, buf []byte) int { return -1 } buf = buf[4:] - //buf = incBytePtr(buf, 4) s2 -= 4 if s2 < 0 { break