Using my C_RTMP_Write func - tested and working

This commit is contained in:
saxon 2018-08-10 22:27:51 +09:30
parent 44187cdc22
commit 9fcdfe6367
1 changed files with 2 additions and 2 deletions

View File

@ -424,8 +424,8 @@ func (s *session) Write(data []byte) (int, error) {
return 0, Err(1)
}
// if C_RTMP_Write(s.rtmp, data) == 0 {
if C.RTMP_Write(s.rtmp, (*C.char)(unsafe.Pointer(&data[0])), C.int(len(data))) == 0 {
if C_RTMP_Write(s.rtmp, data) == 0 {
//if C.RTMP_Write(s.rtmp, (*C.char)(unsafe.Pointer(&data[0])), C.int(len(data))) == 0 {
return 0, Err(2)
}
return len(data), nil