Nikolay Sivov (@nsivov) commented about dlls/evr/sample.c:
- if (allocator->callback)
IMFVideoSampleAllocatorNotify_NotifyRelease(allocator->callback);
callback = allocator->callback;
if (callback && allocator->lock_notify_release)
{
IMFVideoSampleAllocatorNotify_NotifyRelease(callback);
callback = NULL;
} LeaveCriticalSection(&allocator->cs);
if (callback)
IMFVideoSampleAllocatorNotify_NotifyRelease(callback);
return S_OK;
Now there is a chance that "callback" itself is released before you get to NotifyRelease().