He's trying to argue that something can still be illegal even if it isn't harmful to anyone else. Which is true. Prostitution and recreational drug use are two examples.
He's using child porn instead because if he used prostitution or drug use, I'd say, "you're right, we should go ahead and legalize prostitution and drug use."
The circumstance is so narrow (someone finds child porn, didnt buy it, didnt produce it, only watches it by themselves) that you can't really say it's harmful by itself but it's still illegal and no one would argue that child porn possession should be legal.
To that I say, simple possession should remain illegal because the production of child porn is so harmful that anyone with any association to it, even simple possession, should face legal consequences.
And that's where it differs from gay marriage. Gay marriage isn't harmful, even remotely. Child porn is.