From 5938dcf0d513442e5066bcef0044f5c0159fcb63 Mon Sep 17 00:00:00 2001 From: saxon Date: Fri, 20 Jul 2018 21:34:38 +0930 Subject: [PATCH] Ported RTMP_SetBufferMS and tested --- rtmp/rtmp.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 {