On Wed Oct 25 17:58:55 2023 +0000, Bernhard Kölbl wrote:
Assigned this to you as you're investigating this.
The deadlock is this:
media_engine_Shutdown (holds `engine->cs`) -> session Shutdown -> samplegrabber media sink Shutdown (wants `grabber->cs`)
vs
sample_grabber_stream_timer_callback_Invoke (holds `grabber->cs`) -> media_engine_grabber_callback_OnProcessSample (wants `engine->cs`)
I think we can make `engine->flags` atomic and don't try to acquire `enigne->cs` in case the engine is shutdown.