I would imagine that this problem is caused by the connections coming loose inside the player. The solution to this is either send it away to be fixed, or you open it up & re-seat and solder the socket onto the board. - This will be fiddley & dangerous, tho' more dangerous for the player than yourself.
Before you reach for that soldering iron, just make sure it is the socket that's playing up. Test the player with at least one other set of headphones & check if the problem occurs at the same time in the same track.
Chris Murphy, September 2006