[PATCH 1/6] mf/samplegrabber: Always release cancellation key when timer is invoked.

Nikolay Sivov nsivov at codeweavers.com
Wed Jan 5 12:38:36 CST 2022



On 1/5/22 18:52, Derek Lesho wrote:
> On 1/5/22 06:01, Nikolay Sivov wrote:
>
>>
>>
>> On 1/4/22 20:35, Derek Lesho wrote:
>>> The sample grabber currently leaks the key on the last invokation of 
>>> the timer, as it is only released when stream_schedule_sample is 
>>> called.
>> It's also released when sample grabber sink is released. Is that not 
>> always enough? Or is that useful when sink is reused for next topology?
>>
>>
> The problem is that it introduces a circular dependency, the cancel 
> key holds a reference to the timer callback, which contributes to the 
> reference count of the sample grabber stream sink and media sink.
I see, so this could be solved by releasing this key on shutdown, and 
ensuring that shutdown actually happens. I'll take a look at what's 
going on with its special IMFActivate vs normal shutdown method.



More information about the wine-devel mailing list