Upvote:2
According to the IATA Travel Centre:
TWOV (Transit Without Visa):
Passengers transiting through Cape Town (CPT), Durban (DUR), Johannesburg (JNB) or Lanseria (HLA) with a confirmed onward ticket for a flight to a third country. They must stay in the international transit area of the airport and have documents required for the next destination.
Assuming you're transiting in Johannesburg with a connecting flight to Swaziland, this implies that you shouldn't need a visa.
I took a few liberties when entering your details into the calculator since I don't know your travel document details, expiry date, etcetera, so I'd try it out yourself just in case.