Skip to content

Commit

Permalink
Do not send empty NACK packets
Browse files Browse the repository at this point in the history
  • Loading branch information
adriancable committed Oct 16, 2023
1 parent 69a58bb commit 9e7807b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/nack/generator_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ func (n *GeneratorInterceptor) loop(rtcpWriter interceptor.RTCPWriter) {
}
}

if len(filteredMissing) == 0 {
continue

Check warning on line 195 in pkg/nack/generator_interceptor.go

View check run for this annotation

Codecov / codecov/patch

pkg/nack/generator_interceptor.go#L195

Added line #L195 was not covered by tests
}

if _, err := rtcpWriter.Write([]rtcp.Packet{nack}, interceptor.Attributes{}); err != nil {
n.log.Warnf("failed sending nack: %+v", err)
}
Expand Down

0 comments on commit 9e7807b

Please sign in to comment.