On Wed May 3 13:31:16 2023 +0000, Rémi Bernon wrote:
Sure, I can do an early exit for now but I think we will want to do things even during shutdown, and it will probably have to be changed later again anyway. For instance I have some possible plans to replace the read thread with async IMFByteStream reads. I think we might want to keep track of outstanding read / sample requests, decrement the counters here and wait for them in the shutdown procedure.
Okay, another thing that we should consider I think, is to get rid of separate work queue for every source object. That did create problems before, when application created too many sources failing to respond to errors and exhausted maximum possible number of user queues. There is a MFLockSharedWorkQueue() that could be used here.