From 618e989a1bbab9c0b676846749b3739b38e1b949 Mon Sep 17 00:00:00 2001 From: dexter <178529795@qq.com> Date: Thu, 10 Mar 2022 09:52:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8A=A0=E4=B8=8A=E5=AF=B9=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E7=AB=AF=E5=8F=A3=E5=8F=B7=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client.go | 3 +++ server.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index 143d985..f56e513 100644 --- a/client.go +++ b/client.go @@ -17,6 +17,9 @@ func NewRTMPClient(addr string) (client *NetConnection, err error) { plugin.Error("connect url parse", zap.Error(err)) return nil, err } + if strings.Count(u.Host, ":") == 0 { + u.Host += ":1935" + } conn, err := net.Dial("tcp", u.Host) if err != nil { plugin.Error("dial tcp", zap.String("host", u.Host), zap.Error(err)) diff --git a/server.go b/server.go index 9514aad..4a1aa75 100644 --- a/server.go +++ b/server.go @@ -21,7 +21,7 @@ func (ns *NetStream) Begin() { ns.SendStreamID(RTMP_USER_STREAM_BEGIN, ns.StreamID) } -var gstreamid = uint32(64) +var gstreamid uint32 type RTMPSubscriber struct { RTMPSender