Nikolay Sivov (@nsivov) commented about dlls/evr/sample.c:
} IMFSample_Release(sample);
- if (allocator->callback)
IMFVideoSampleAllocatorNotify_NotifyRelease(allocator->callback);
callback = allocator->callback;
LeaveCriticalSection(&allocator->cs);
if (callback)
IMFVideoSampleAllocatorNotify_NotifyRelease(allocator->callback);
return S_OK;
This is public API, and NotifyRelease() is blocking on Windows. What I suggested was to create some customized version of this, just for internal use. For example conditionally, or with a different Invoke() method implementation, whatever looks better.