Nikolay Sivov (@nsivov) commented about dlls/evr/sample.c:
+ if (callback) + { + IMFVideoSampleAllocatorNotify_AddRef(callback); + if (lock_notify_release) + IMFVideoSampleAllocatorNotify_NotifyRelease(callback); + }
LeaveCriticalSection(&allocator->cs);
+ if (callback) + { + if (!lock_notify_release) + IMFVideoSampleAllocatorNotify_NotifyRelease(callback); + IMFVideoSampleAllocatorNotify_Release(callback); + } + Just set "callback" only for our custom case. We don't need addref/release for a normal case, and you also don't need a local variable for lock_notify_release.
Note that commit message does not describe what's happening in current version. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3319#note_42022