Taking a break

This commit is contained in:
saxon 2018-07-11 14:54:35 +09:30
parent ea14c4989b
commit 030b3f6fca
1 changed files with 2 additions and 5 deletions

View File

@ -114,7 +114,6 @@ func cPtrInc(a *C.char, inc C.uint) *C.char {
func (s *session) rtmpWrite(r *C.RTMP, buf []byte) int { func (s *session) rtmpWrite(r *C.RTMP, buf []byte) int {
var pkt *C.RTMPPacket = &r.m_write var pkt *C.RTMPPacket = &r.m_write
var pend, enc []byte
size := len(buf) size := len(buf)
s2 := size s2 := size
var ret, num int var ret, num int
@ -165,10 +164,8 @@ func (s *session) rtmpWrite(r *C.RTMP, buf []byte) int {
return 0 return 0
} }
// Note this is pointer arithmatic enc := C.GoBytes(unsafe.Pointer(pkt.m_body),C.int(pkt.m_nBodySize))
enc = pkt.m_body pend := enc[int(pkt.m_nBodySize):]
// pend = enc + pkt.m_nBodySize
pend = cPtrInc(enc,pkt.m_nBodySize)
if pkt.m_packetType == C.RTMP_PACKET_TYPE_INFO { if pkt.m_packetType == C.RTMP_PACKET_TYPE_INFO {
enc = C.AMF_EncodeString(enc, pend, &av_setDataFrame ) enc = C.AMF_EncodeString(enc, pend, &av_setDataFrame )