FWIW as a bit of a look-see.
This was the best I could do for Mel-Jnb on
greatcirclemapper
It puts the distance at 6300 nm .... allowing for going South of FIMP, it will still be about 6200 nm. Whilst the 777 does LAX-MEL at about 6900 nm, the MEL-JNB track via Per is entirely in strong headwinds, and allowing for some weather holding at JNB, it will be do-able, but at times, tight.
Direct Syd-Jnb is about 6000 nm - but with the flexibility of avoiding some of the Jetstream activity - the great circle track not an option for the 777.
For Completeness ... Mel-Jnb
direct track 5600nm.
So it will be at least an hour longer (maybe two) on the 777 to go Mel-Jnb than for the 747 to go Syd-Jnb. But the 777 gets to stay closer to civilisation and miss a few hours over the ice-pack.
N