forked from External/mediamtx
rtmp: change default RTMPS port to 1936 when it is omitted in source (#2821)
This commit is contained in:
parent
4e8b8a2014
commit
fe4f436bd3
2 changed files with 9 additions and 5 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue