mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 23:02:45 +08:00
fix isChannelPairInUse() (#306)
This commit is contained in:
@@ -1382,7 +1382,7 @@ func (c *Client) doSetup(
|
|||||||
|
|
||||||
func (c *Client) isChannelPairInUse(channel int) bool {
|
func (c *Client) isChannelPairInUse(channel int) bool {
|
||||||
for _, cm := range c.medias {
|
for _, cm := range c.medias {
|
||||||
if cm.tcpChannel == channel || cm.tcpChannel == (channel+1) {
|
if (cm.tcpChannel+1) == channel || cm.tcpChannel == channel || cm.tcpChannel == (channel+1) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1115,7 +1115,7 @@ func (ss *ServerSession) handleRequestInner(sc *ServerConn, req *base.Request) (
|
|||||||
|
|
||||||
func (ss *ServerSession) isChannelPairInUse(channel int) bool {
|
func (ss *ServerSession) isChannelPairInUse(channel int) bool {
|
||||||
for _, sm := range ss.setuppedMedias {
|
for _, sm := range ss.setuppedMedias {
|
||||||
if sm.tcpChannel == channel || sm.tcpChannel == (channel+1) {
|
if (sm.tcpChannel+1) == channel || sm.tcpChannel == channel || sm.tcpChannel == (channel+1) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user