Fix for mplayer. I still don't like this implementation :(