only cache the video packet to gopqueue

pull/154/head
macbookpro 2019-02-20 17:53:27 +08:00
parent 23b5c74d32
commit 05ba4e9837
1 changed files with 1 additions and 1 deletions

View File

@ -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() {