diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index c14e11af..0545dcf2 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -370,7 +370,7 @@ func startSession(rtmp *C.RTMP, u string, timeout uint32) (*C.RTMP, error) { } rtmpEnableWrite(rtmp) - C.RTMP_SetBufferMS(rtmp, 3600*1000) + rtmpSetBufferMS(rtmp, 3600*1000) if C.RTMP_Connect(rtmp, nil) == 0 { //C.RTMP_Close(rtmp) //C.RTMP_Free(rtmp) @@ -559,6 +559,10 @@ func rtmpEnableWrite(r *C.RTMP) { r.Link.protocol |= RTMP_FEATURE_WRITE } +func rtmpSetBufferMS(r *C.RTMP, size int32) { + r.m_nBufferMS = C.int(size) +} + /* func socksSetup(r *RTMP, sockshost *AVal) { if sockshost.av_len != 0 {