mirror of
https://github.com/bluenviron/mediamtx
synced 2025-01-19 13:31:00 +00:00
add clients to udpClientPublishers only if protocol is udp
This commit is contained in:
parent
26a6f5b501
commit
ec79043b04
8
main.go
8
main.go
@ -421,14 +421,18 @@ outer:
|
||||
case programEventClientRecord:
|
||||
p.publisherCount += 1
|
||||
evt.client.state = clientStateRecord
|
||||
p.udpClientPublishers[makeIpKey(evt.client.ip())] = evt.client
|
||||
if evt.client.streamProtocol == gortsplib.StreamProtocolUdp {
|
||||
p.udpClientPublishers[makeIpKey(evt.client.ip())] = evt.client
|
||||
}
|
||||
p.paths[evt.client.pathId].publisherSetReady()
|
||||
close(evt.done)
|
||||
|
||||
case programEventClientRecordStop:
|
||||
p.publisherCount -= 1
|
||||
evt.client.state = clientStatePreRecord
|
||||
delete(p.udpClientPublishers, makeIpKey(evt.client.ip()))
|
||||
if evt.client.streamProtocol == gortsplib.StreamProtocolUdp {
|
||||
delete(p.udpClientPublishers, makeIpKey(evt.client.ip()))
|
||||
}
|
||||
p.paths[evt.client.pathId].publisherSetNotReady()
|
||||
close(evt.done)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user