diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index f868b30c..5509998e 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -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