mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-25 16:50:27 +08:00
rtmp: change default RTMPS port to 1936 when it is omitted in source (#2821)
This commit is contained in:
@@ -46,7 +46,11 @@ func (s *Source) Run(params defs.StaticSourceRunParams) error {
|
||||
// add default port
|
||||
_, _, err = net.SplitHostPort(u.Host)
|
||||
if err != nil {
|
||||
u.Host = net.JoinHostPort(u.Host, "1935")
|
||||
if u.Scheme == "rtmp" {
|
||||
u.Host = net.JoinHostPort(u.Host, "1935")
|
||||
} else {
|
||||
u.Host = net.JoinHostPort(u.Host, "1936")
|
||||
}
|
||||
}
|
||||
|
||||
nconn, err := func() (net.Conn, error) {
|
||||
|
||||
Reference in New Issue
Block a user