mirror of https://bitbucket.org/ausocean/av.git
Finally working
This commit is contained in:
parent
21e80b483c
commit
b0aa39c29b
|
@ -110,11 +110,11 @@ func (s *session) Write(data []byte) (int, error) {
|
|||
if s.rtmp == nil {
|
||||
return 0, Err(3)
|
||||
}
|
||||
if C.RTMP_IsConnected(s.rtmp) <= 0 {
|
||||
if C.RTMP_IsConnected(s.rtmp) == 0 {
|
||||
return 0, Err(1)
|
||||
}
|
||||
if C.RTMP_Write(s.rtmp,(*C.char)(unsafe.Pointer(&data[0])),C.int(len(data))) <= 0 {
|
||||
//if rtmpWrite(s.rtmp, data) <= 0 {
|
||||
//if C.RTMP_Write(s.rtmp,(*C.char)(unsafe.Pointer(&data[0])),C.int(len(data))) == 0 {
|
||||
if rtmpWrite(s.rtmp, data) == 0 {
|
||||
return 0, Err(2)
|
||||
}
|
||||
return len(data), nil
|
||||
|
|
Loading…
Reference in New Issue