From 05ba4e98374185d21210187057099c0c01d052cf Mon Sep 17 00:00:00 2001 From: macbookpro Date: Wed, 20 Feb 2019 17:53:27 +0800 Subject: [PATCH] only cache the video packet to gopqueue --- rtsp/pusher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtsp/pusher.go b/rtsp/pusher.go index 7e96169e..3366654f 100644 --- a/rtsp/pusher.go +++ b/rtsp/pusher.go @@ -229,7 +229,7 @@ func (pusher *Pusher) Start() { continue } - if pusher.gopCacheEnable { + if pusher.gopCacheEnable && pack.Type == RTP_TYPE_VIDEO { pusher.gopCacheLock.Lock() if strings.EqualFold(pusher.VCodec(), "h264") { if rtp := ParseRTP(pack.Buffer.Bytes()); rtp != nil && rtp.IsKeyframeStart() {