Skip to content

Commit 987fb7a

Browse files
committedFeb 5, 2024
Fix panic of rtx attributes
1 parent d82b0d0 commit 987fb7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎rtpreceiver.go

+3
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,9 @@ func (r *RTPReceiver) receiveForRtx(ssrc SSRC, rsid string, streamInfo *intercep
454454
continue
455455
}
456456

457+
if attributes == nil {
458+
attributes = make(interceptor.Attributes)
459+
}
457460
attributes.Set(AttributeRtxPayloadType, b[1]&0x7F)
458461
attributes.Set(AttributeRtxSequenceNumber, binary.BigEndian.Uint16(b[2:4]))
459462
attributes.Set(AttributeRtxSsrc, binary.BigEndian.Uint32(b[8:12]))

0 commit comments

Comments
 (0)
Please sign in to comment.