From 9defe4eec3ef2dea6219e86c0a058009873d5baa Mon Sep 17 00:00:00 2001 From: langhuihui <178529795@qq.com> Date: Tue, 23 May 2023 20:58:59 +0800 Subject: [PATCH] fit engine update --- main.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 0679868..219d54f 100644 --- a/main.go +++ b/main.go @@ -74,14 +74,12 @@ var rtspConfig = &RTSPConfig{} var RTSPPlugin = InstallPlugin(rtspConfig) func filterStreams() (ss []*Stream) { - Streams.RLock() - defer Streams.RUnlock() - for _, s := range Streams.Map { + Streams.Range(func(key string, s *Stream) { switch s.Publisher.(type) { case *RTSPPublisher, *RTSPPuller: ss = append(ss, s) } - } + }) return }