© Getty Images
However, JP Duminy got the breakthrough with a reviewed decision against Warner. With the ball beginning to swing, Alex Doolan (5) went when he edged one to Graeme Smith and in the next over Shaun Marsh was lbw on Vernon Philander's bowling.
Michael Clarke went for just one, caught by Faf du Plessis as South Africa began to take control. Dale Steyn then got Steve Smith lbw next ball, before Brad Haddin lost his middle stump to the same man.
That made it five wickets for 14 runs in 10 overs. Rogers, who had completed his fourth Test century in his 13th match, was then run out by substitute fielder Alviro Petersen.
Part-time spinner Dean Elgar wrapped up the victory for the Proteas when he trapped last man Nathan Lyon lbw after the umpires had extended the final session.
The final match of the series will take place in Cape Town on March 1.