Fixes black boxes issue with GL when video is reinitialized (#1076)

7 jobs for master in 10 minutes and 9 seconds (queued for 10 minutes and 37 seconds)