only cache the video packet to gopqueue

pull/154/head
macbookpro 6 years ago
parent 23b5c74d32
commit 05ba4e9837

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

Loading…
Cancel
Save