mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 23:02:45 +08:00
remove useless check (#849)
This commit is contained in:
@@ -1586,10 +1586,6 @@ func (c *Client) doSetup(
|
|||||||
transport = *c.effectiveTransport
|
transport = *c.effectiveTransport
|
||||||
th.Secure = c.effectiveSecure
|
th.Secure = c.effectiveSecure
|
||||||
|
|
||||||
if th.Secure && !medi.Secure {
|
|
||||||
return nil, fmt.Errorf("previous media was setupped securely but current cannot")
|
|
||||||
}
|
|
||||||
|
|
||||||
// use transport from config, secure flag from server
|
// use transport from config, secure flag from server
|
||||||
case c.Transport != nil:
|
case c.Transport != nil:
|
||||||
transport = *c.Transport
|
transport = *c.Transport
|
||||||
@@ -1618,9 +1614,9 @@ func (c *Client) doSetup(
|
|||||||
|
|
||||||
switch transport {
|
switch transport {
|
||||||
case TransportUDP, TransportUDPMulticast:
|
case TransportUDP, TransportUDPMulticast:
|
||||||
if c.Scheme == "rtsps" && !medi.Secure {
|
if c.Scheme == "rtsps" && !th.Secure {
|
||||||
cm.close()
|
cm.close()
|
||||||
return nil, fmt.Errorf("server does not support secure UDP")
|
return nil, fmt.Errorf("unable to setup secure UDP")
|
||||||
}
|
}
|
||||||
|
|
||||||
th.Protocol = headers.TransportProtocolUDP
|
th.Protocol = headers.TransportProtocolUDP
|
||||||
|
Reference in New Issue
Block a user