mirror of
https://github.com/livekit/livekit.git
synced 2026-10-23 17:22:59 +00:00
Handle nil when buffer pair doesn't exist
This commit is contained in:
1 parent
0a20acdf68
commit
5a057f3d19
1 file changed
+7
@@ -327,6 +327,13 @@ func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.Tra
|
||||
defer t.lock.Unlock()
|
||||
|
||||
buff, rtcpReader := t.params.BufferFactory.GetBufferPair(uint32(track.SSRC()))
|
||||
if buff == nil || rtcpReader == nil {
|
||||
logger.Errorw("could not retrieve buffer pair", nil,
|
||||
"participant", t.params.ParticipantIdentity,
|
||||
"participantID", t.params.ParticipantID,
|
||||
"track", t.ID())
|
||||
return
|
||||
}
|
||||
buff.OnFeedback(t.handlePublisherFeedback)
|
||||
|
||||
if t.Kind() == livekit.TrackType_AUDIO {
|
||||
|
||||
Reference in new issue
Block a user