Through my experience of audio/video losing sync with each other there are several things;
There are many versions of Codecs (DivX in particular) that have these problems in certain version and by either updating or possibly even downgrading to a lower version may solve this problem.
Another is that if the CPU usage is running particularly high, you may want to disable some processes before playback to take off the strain.
Soundcard drivers! Another possible idea. Try updating to the latest version.
Try VLC Media Player. I have been recommended this before and it plays nearly every type of media and seems to be more reliable than most players.
Ufortunately there are many other possible reasons but these are the most likely.