From 2d02b77fc1a84bd545268eca65c0f28b7a9357c2 Mon Sep 17 00:00:00 2001 From: saxon Date: Fri, 20 Jul 2018 21:27:28 +0930 Subject: [PATCH] Removed functions we don't need --- rtmp/rtmp.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index c54353b6..3bd6e9f4 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -364,16 +364,12 @@ func startSession(rtmp *C.RTMP, u string, timeout uint32) (*C.RTMP, error) { rtmpInit(rtmp) rtmp.Link.timeout = connect_timeout if rtmpSetupUrl(rtmp, u) == 0 { - C.RTMP_Close(rtmp) - C.RTMP_Free(rtmp) return nil, errors.New("rtmp startSession: Failed to setup URL!") } C.RTMP_EnableWrite(rtmp) C.RTMP_SetBufferMS(rtmp, 3600*1000) if C.RTMP_Connect(rtmp, nil) == 0 { - C.RTMP_Close(rtmp) - C.RTMP_Free(rtmp) return nil, errors.New("rtmp startSession: Failed to connect!") }