From 785f293376e5b03cc5300d4a5effbf93c825401a Mon Sep 17 00:00:00 2001 From: mask-pp Date: Mon, 3 Aug 2020 19:29:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rtsp/pusher.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rtsp/pusher.go b/rtsp/pusher.go index 962e8512..13263938 100644 --- a/rtsp/pusher.go +++ b/rtsp/pusher.go @@ -354,12 +354,8 @@ func (pusher *Pusher) RemovePlayer(player *Player) *Pusher { func (pusher *Pusher) ClearPlayer() { // copy a new map to avoid deadlock - players := make(map[string]*Player) pusher.playersLock.Lock() - for k, v := range pusher.players { - //v.Stop() - players[k] = v - } + players := pusher.players pusher.players = make(map[string]*Player) pusher.playersLock.Unlock() go func() { // do not block