mirror of https://bitbucket.org/ausocean/av.git
Commented out rtmp close and rtmp frees - tested and working
This commit is contained in:
parent
3a56d47244
commit
b20a344eb1
12
rtmp/rtmp.go
12
rtmp/rtmp.go
|
@ -400,8 +400,8 @@ func startSession(rtmp *C.RTMP, u string, timeout uint32) (*C.RTMP, error) {
|
|||
rtmp.Link.timeout = connect_timeout
|
||||
if rtmpSetupUrl(rtmp, u) == 0 {
|
||||
// if C.RTMP_SetupURL(rtmp, C.CString(u)) == 0 {
|
||||
C.RTMP_Close(rtmp)
|
||||
C.RTMP_Free(rtmp)
|
||||
//C.RTMP_Close(rtmp)
|
||||
//C.RTMP_Free(rtmp)
|
||||
return nil, errors.New("rtmp startSession: Failed to setup URL!")
|
||||
}
|
||||
|
||||
|
@ -411,16 +411,16 @@ func startSession(rtmp *C.RTMP, u string, timeout uint32) (*C.RTMP, error) {
|
|||
C.RTMP_SetBufferMS(rtmp, 3600*1000)
|
||||
// if rtmpConnect(rtmp, nil) == 0 {
|
||||
if C.RTMP_Connect(rtmp, nil) == 0 {
|
||||
C.RTMP_Close(rtmp)
|
||||
C.RTMP_Free(rtmp)
|
||||
//C.RTMP_Close(rtmp)
|
||||
//C.RTMP_Free(rtmp)
|
||||
return nil, errors.New("rtmp startSession: Failed to connect!")
|
||||
}
|
||||
|
||||
// TODO: port this
|
||||
// if rtmpConnectStream(rtmp, 0) == 0 {
|
||||
if C.RTMP_ConnectStream(rtmp, 0) == 0 {
|
||||
C.RTMP_Close(rtmp)
|
||||
C.RTMP_Free(rtmp)
|
||||
//C.RTMP_Close(rtmp)
|
||||
//C.RTMP_Free(rtmp)
|
||||
return nil, errors.New("rtmp startSession: Failed to connect stream!")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue