Fix: The screen stayed black when restarting a file.

This commit fixes ticket #3908.
Fix a possible dead lock when opening a file when one is already playing.

Easily reproducible with madVR.

Ticket #3865.