Skip to content

Commit

Permalink
Minor fixes to TestInterceptorNack
Browse files Browse the repository at this point in the history
One variable was misnamed, and we never checked for the end
of the RTCP loop.
  • Loading branch information
jech authored Jan 8, 2025
1 parent b47fbb6 commit 6f6231b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions interceptor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func Test_Interceptor_ZeroSSRC(t *testing.T) {
}

// TestInterceptorNack is an end-to-end test for the NACK sender.
// It test that:
// It tests that:
// - we get a NACK if we negotiated generic NACks;
// - we don't get a NACK if we did not negotiate generick NACKs;
// - the NACK corresponds to the missing packet.
Expand All @@ -306,16 +306,16 @@ func testInterceptorNack(t *testing.T, requestNack bool) {

ir := interceptor.Registry{}
m := MediaEngine{}
var capability []RTCPFeedback
var feedback []RTCPFeedback
if requestNack {
capability = append(capability, RTCPFeedback{"nack", ""})
feedback = append(feedback, RTCPFeedback{"nack", ""})
}
err := m.RegisterCodec(
RTPCodecParameters{
RTPCodecCapability: RTPCodecCapability{
"video/VP8", 90000, 0,
"",
capability,
feedback,
},
PayloadType: 96,
},
Expand Down Expand Up @@ -424,7 +424,6 @@ func testInterceptorNack(t *testing.T, requestNack bool) {
assert.NoError(t, err)
err = pc2.Close()
assert.NoError(t, err)
<-rtcpDone

if requestNack {
if !gotNack {
Expand Down

0 comments on commit 6f6231b

Please sign in to comment.