Fix panic of rtx attributes

This commit is contained in:
cnderrauber
2024-02-02 17:34:48 +08:00
committed by cnderrauber
parent d82b0d0a88
commit 987fb7abdd

View File

@@ -454,6 +454,9 @@ func (r *RTPReceiver) receiveForRtx(ssrc SSRC, rsid string, streamInfo *intercep
continue
}
if attributes == nil {
attributes = make(interceptor.Attributes)
}
attributes.Set(AttributeRtxPayloadType, b[1]&0x7F)
attributes.Set(AttributeRtxSequenceNumber, binary.BigEndian.Uint16(b[2:4]))
attributes.Set(AttributeRtxSsrc, binary.BigEndian.Uint32(b[8:12]))