Loose the porn. To decrease desire some sex offenders are shown flick after flick - the theory is that once it becomes old it becomes less interesting.
Totally in your head man. You girl sounds cool. So next time it happens just pull out and do whatever you gotta do to get hard again. I dont know if you use condoms, but those always messed up my game. I could never stay hard when I would use a condom...thank god for birth control.
But yeah...it sounds like it is all in your head. Just play around, and try different things that get ya going. If you start to lose it, just go back to one of those moves. I bet the problem will quickly go away