mirror of
https://github.com/aler9/gortsplib
synced 2025-09-27 11:32:08 +08:00
client: fix RTSPS default port
This commit is contained in:
10
client.go
10
client.go
@@ -977,8 +977,14 @@ func (c *Client) connOpen() error {
|
||||
return fmt.Errorf("RTSPS can be used only with TCP")
|
||||
}
|
||||
|
||||
if !strings.Contains(c.host, ":") {
|
||||
c.host += ":554"
|
||||
// add default port
|
||||
_, _, err := net.SplitHostPort(c.host)
|
||||
if err != nil {
|
||||
if c.scheme == "rtsp" {
|
||||
c.host = net.JoinHostPort(c.host, "554")
|
||||
} else { // rtsps
|
||||
c.host = net.JoinHostPort(c.host, "8322")
|
||||
}
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(c.ctx, c.ReadTimeout)
|
||||
|
Reference in New Issue
Block a user