mirror of https://bitbucket.org/ausocean/av.git
Tested rtmpAlloc - works
This commit is contained in:
parent
1d1ff01681
commit
12788e0325
|
@ -361,9 +361,9 @@ func (s *session) Write(data []byte) (int, error) {
|
|||
func startSession(rtmp *C.RTMP, u string, timeout uint32) (*C.RTMP, error) {
|
||||
connect_timeout := C.int(timeout)
|
||||
rtmp = rtmpAlloc()
|
||||
rtmpInit(rtmp)
|
||||
C.RTMP_Init(rtmp)
|
||||
rtmp.Link.timeout = connect_timeout
|
||||
if rtmpSetupUrl(rtmp, u) == 0 {
|
||||
if C.RTMP_SetupURL(rtmp, (*C.char)(unsafe.Pointer(goStrToCStr(u)))) == 0 {
|
||||
C.RTMP_Close(rtmp)
|
||||
C.RTMP_Free(rtmp)
|
||||
return nil, errors.New("rtmp startSession: Failed to setup URL!")
|
||||
|
|
Loading…
Reference in New Issue