Skip to content

Commit

Permalink
fix: rtcp interceptor nil panic
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeTeng2001 committed Oct 14, 2024
1 parent 3f1622a commit 0fafa6d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rtpreceiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@ func (r *RTPReceiver) streamsForTrack(t *TrackRemote) *trackStreams {
func (r *RTPReceiver) readRTP(b []byte, reader *TrackRemote) (n int, a interceptor.Attributes, err error) {
<-r.received
if t := r.streamsForTrack(reader); t != nil {
if t.rtcpInterceptor == nil {
return 0, nil, nil

Check warning on line 377 in rtpreceiver.go

View check run for this annotation

Codecov / codecov/patch

rtpreceiver.go#L377

Added line #L377 was not covered by tests
}
return t.rtpInterceptor.Read(b, a)
}

Expand Down

0 comments on commit 0fafa6d

Please sign in to comment.