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