mirror of https://bitbucket.org/ausocean/av.git
Taking a break
This commit is contained in:
parent
ea14c4989b
commit
030b3f6fca
|
@ -114,7 +114,6 @@ func cPtrInc(a *C.char, inc C.uint) *C.char {
|
|||
|
||||
func (s *session) rtmpWrite(r *C.RTMP, buf []byte) int {
|
||||
var pkt *C.RTMPPacket = &r.m_write
|
||||
var pend, enc []byte
|
||||
size := len(buf)
|
||||
s2 := size
|
||||
var ret, num int
|
||||
|
@ -165,10 +164,8 @@ func (s *session) rtmpWrite(r *C.RTMP, buf []byte) int {
|
|||
return 0
|
||||
}
|
||||
|
||||
// Note this is pointer arithmatic
|
||||
enc = pkt.m_body
|
||||
// pend = enc + pkt.m_nBodySize
|
||||
pend = cPtrInc(enc,pkt.m_nBodySize)
|
||||
enc := C.GoBytes(unsafe.Pointer(pkt.m_body),C.int(pkt.m_nBodySize))
|
||||
pend := enc[int(pkt.m_nBodySize):]
|
||||
|
||||
if pkt.m_packetType == C.RTMP_PACKET_TYPE_INFO {
|
||||
enc = C.AMF_EncodeString(enc, pend, &av_setDataFrame )
|
||||
|
|
Loading…
Reference in New Issue