Using my sendPacket func in sendConnectPacket - tested and working

This commit is contained in:
saxon 2018-07-29 10:27:46 +09:30
parent 1f6a59b050
commit 6978e73aee
1 changed files with 4 additions and 4 deletions

View File

@ -944,8 +944,8 @@ func sendConnectPacket(r *C.RTMP, cp *C.RTMPPacket) int {
var enc *byte var enc *byte
if cp != nil { if cp != nil {
//return rtmpSendPacket(r, cp, 1) return rtmpSendPacket(r, cp, 1)
return int(C.RTMP_SendPacket(r, cp, 1)) //return int(C.RTMP_SendPacket(r, cp, 1))
} }
packet.m_nChannel = 0x03 packet.m_nChannel = 0x03
@ -1107,8 +1107,8 @@ func sendConnectPacket(r *C.RTMP, cp *C.RTMPPacket) int {
packet.m_nBodySize = C.uint32_t(int(uintptr(decBytePtr(unsafe.Pointer(enc), packet.m_nBodySize = C.uint32_t(int(uintptr(decBytePtr(unsafe.Pointer(enc),
int(uintptr(unsafe.Pointer(packet.m_body))))))) int(uintptr(unsafe.Pointer(packet.m_body)))))))
return int(C.RTMP_SendPacket(r, &packet, 1)) //return int(C.RTMP_SendPacket(r, &packet, 1))
//return rtmpSendPacket(r, &packet, 1) return rtmpSendPacket(r, &packet, 1)
} }
func rtmpConnectStream(r *C.RTMP, seekTime int32) int { func rtmpConnectStream(r *C.RTMP, seekTime int32) int {