From: Derek Lesho Subject: Re: [PATCH 1/6] mf/samplegrabber: Always release cancellation key when timer is invoked. Message-Id: <48175fa4-6d01-7d1a-0d17-54c4ec780e8d@codeweavers.com> Date: Wed, 5 Jan 2022 10:52:28 -0500 In-Reply-To: References: <20220104173527.77306-1-dlesho@codeweavers.com> 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.