What you need is VLC Media Player, the exact same problem used to happen to a friend of mine until I gave him this program. It can play a lot of formats, basically everything. I have tested it and it is absolutely great. Here's the link it is free by the way.