From 281a5c7c8f193ef3e2c7d6a5afcdcaf8c10448d3 Mon Sep 17 00:00:00 2001 From: David Colburn Date: Thu, 18 Jan 2024 13:59:26 -0800 Subject: [PATCH] fix panic --- pkg/jitter/buffer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/jitter/buffer.go b/pkg/jitter/buffer.go index bf4aafaf..299eb86c 100644 --- a/pkg/jitter/buffer.go +++ b/pkg/jitter/buffer.go @@ -426,7 +426,7 @@ func (b *Buffer) drop() { c = b.head // break if head is part of a new sample - if b.head.packet.Timestamp != ts { + if b.head == nil || b.head.packet.Timestamp != ts { break } }