mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-24 20:11:56 -08:00
do not terminate session during protocol negotiation, allowing clients to connect without explicitly set the protocol
This commit is contained in:
parent
0839a853a8
commit
67efdb6831
1 changed files with 4 additions and 4 deletions
|
|
@ -519,7 +519,7 @@ func (c *Client) handleRequest(req *base.Request) error {
|
|||
if th.Protocol == gortsplib.StreamProtocolUDP {
|
||||
if _, ok := c.protocols[gortsplib.StreamProtocolUDP]; !ok {
|
||||
c.writeResError(cseq, base.StatusUnsupportedTransport, fmt.Errorf("UDP streaming is disabled"))
|
||||
return errRunTerminate
|
||||
return nil
|
||||
}
|
||||
|
||||
if len(c.streamTracks) > 0 && c.streamProtocol != gortsplib.StreamProtocolUDP {
|
||||
|
|
@ -582,7 +582,7 @@ func (c *Client) handleRequest(req *base.Request) error {
|
|||
} else {
|
||||
if _, ok := c.protocols[gortsplib.StreamProtocolTCP]; !ok {
|
||||
c.writeResError(cseq, base.StatusUnsupportedTransport, fmt.Errorf("TCP streaming is disabled"))
|
||||
return errRunTerminate
|
||||
return nil
|
||||
}
|
||||
|
||||
if len(c.streamTracks) > 0 && c.streamProtocol != gortsplib.StreamProtocolTCP {
|
||||
|
|
@ -651,7 +651,7 @@ func (c *Client) handleRequest(req *base.Request) error {
|
|||
if th.Protocol == gortsplib.StreamProtocolUDP {
|
||||
if _, ok := c.protocols[gortsplib.StreamProtocolUDP]; !ok {
|
||||
c.writeResError(cseq, base.StatusUnsupportedTransport, fmt.Errorf("UDP streaming is disabled"))
|
||||
return errRunTerminate
|
||||
return nil
|
||||
}
|
||||
|
||||
if len(c.streamTracks) > 0 && c.streamProtocol != gortsplib.StreamProtocolUDP {
|
||||
|
|
@ -699,7 +699,7 @@ func (c *Client) handleRequest(req *base.Request) error {
|
|||
} else {
|
||||
if _, ok := c.protocols[gortsplib.StreamProtocolTCP]; !ok {
|
||||
c.writeResError(cseq, base.StatusUnsupportedTransport, fmt.Errorf("TCP streaming is disabled"))
|
||||
return errRunTerminate
|
||||
return nil
|
||||
}
|
||||
|
||||
if len(c.streamTracks) > 0 && c.streamProtocol != gortsplib.StreamProtocolTCP {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue