Screen sharing demo project

I removed the unnecessary flag check, but left it the same. As you expected calling dispatch_source_cancel on a suspended timer will crash. I would prefer not to do your second approach. calling stopCapture would need to block until all current capture processing is done because stopCapture can be called from dealloc from another thread.