Skip to content

Commit

Permalink
only cache the video packet to gopqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
macbookpro committed Feb 20, 2019
1 parent 23b5c74 commit 05ba4e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rtsp/pusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 05ba4e9

Please sign in to comment.