fit engine update

This commit is contained in:
langhuihui
2023-05-23 20:58:54 +08:00
parent 373ab96b25
commit 0f616832c5

View File

@@ -68,14 +68,12 @@ var conf = &RTMPConfig{
var RTMPPlugin = InstallPlugin(conf) var RTMPPlugin = InstallPlugin(conf)
func filterStreams() (ss []*Stream) { func filterStreams() (ss []*Stream) {
Streams.RLock() Streams.Range(func(key string, s *Stream) {
defer Streams.RUnlock()
for _, s := range Streams.Map {
switch s.Publisher.(type) { switch s.Publisher.(type) {
case *RTMPReceiver, *RTMPPuller: case *RTMPReceiver, *RTMPPuller:
ss = append(ss, s) ss = append(ss, s)
} }
} })
return return
} }