From 9e7807ba5ce9c1b78be585856aab2cfbc79dfa41 Mon Sep 17 00:00:00 2001 From: Adrian Cable <6544927+adriancable@users.noreply.github.com> Date: Mon, 16 Oct 2023 10:25:26 -0700 Subject: [PATCH] Do not send empty NACK packets --- pkg/nack/generator_interceptor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/nack/generator_interceptor.go b/pkg/nack/generator_interceptor.go index c476acc9..051e424c 100644 --- a/pkg/nack/generator_interceptor.go +++ b/pkg/nack/generator_interceptor.go @@ -191,6 +191,10 @@ func (n *GeneratorInterceptor) loop(rtcpWriter interceptor.RTCPWriter) { } } + if len(filteredMissing) == 0 { + continue + } + if _, err := rtcpWriter.Write([]rtcp.Packet{nack}, interceptor.Attributes{}); err != nil { n.log.Warnf("failed sending nack: %+v", err) }