My rtmpConnect now working after using C funcs inside

This commit is contained in:
saxon 2018-07-28 15:31:45 +09:30
parent fc53e45505
commit 603ac6dfc7
1 changed files with 4 additions and 3 deletions

View File

@ -658,14 +658,15 @@ func rtmpConnect(r *C.RTMP, cp *C.RTMPPacket) int {
return 0 return 0
} }
} }
if C.RTMP_Connect0(r, (*C.sockaddr)(unsafe.Pointer(&service))) == 0 {
if rtmpConnect0(r, (*C.sockaddr)(unsafe.Pointer(&service))) == 0 { //if rtmpConnect0(r, (*C.sockaddr)(unsafe.Pointer(&service))) == 0 {
return 0 return 0
} }
r.m_bSendCounter = 1 r.m_bSendCounter = 1
return int(rtmpConnect1(r, cp)) //return int(rtmpConnect1(r, cp))
return int(C.RTMP_Connect1(r, cp))
} }
func rtmpConnect0(r *C.RTMP, service *C.sockaddr) int { func rtmpConnect0(r *C.RTMP, service *C.sockaddr) int {