mirror of https://bitbucket.org/ausocean/av.git
rtmp: removed comments containing previous code in C_RTMP_Write
This commit is contained in:
parent
269c8176a1
commit
390c882792
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue