Quit nicely the VideoEngine in single threaded mode if the user
requests the app to close during playback.
Also remove the 2 static analysis errors