vout: ios: fix gpu_ReturnNotPermittedKillClient crashes
commit1399ebae2e123cf3ba112946014b59ef34d639dd
authorThomas Guillem <thomas@gllm.fr>
Wed, 7 Mar 2018 08:11:38 +0000 (7 09:11 +0100)
committerThomas Guillem <thomas@gllm.fr>
Wed, 7 Mar 2018 14:33:50 +0000 (7 15:33 +0100)
tree781db106c9ce546ceead591797de16b8ce3750e2
parentefdfdd4ca58654b2f172618492ab197ae671d3a7
vout: ios: fix gpu_ReturnNotPermittedKillClient crashes

cf. https://developer.apple.com/library/content/qa/qa1766/_index.html

No OpenGLES call should be made once the application entered background.

To fix this issue, this commit disable any rendering (_appActive = NO;) and
flush all OpenGLES commands from the applicationDidEnterBackground
notification.

This commits adds a lock and a condition in order to let the main thread know
when the VLC vout thread unlocked the EAGLContext (because we don't want to
flush this context while it's being used by the vout thread).
modules/video_output/ios.m