[PATCH 0/5] MR116: qasf: Better implementation of ASF reader filter.

Zebediah Figura zfigura at codeweavers.com
Tue May 24 11:09:46 CDT 2022


On 5/24/22 01:12, Rémi Bernon (@rbernon) wrote:
> On Mon May 23 23:15:33 2022 +0000, **** wrote:
>> Zebediah Figura replied on the mailing list:
>> ```
>> On 5/23/22 07:07, Rémi Bernon wrote:
>>> +static HRESULT asf_callback_create(struct asf_reader *filter,
>> IWMReaderCallback **out)
>>> +{
>>> +    struct asf_callback *impl;
>>> +
>>> +    if (!(impl = calloc(1, sizeof(*impl))))
>>> +        return E_OUTOFMEMORY;
>>> +
>>> +    impl->IWMReaderCallback_iface.lpVtbl = &reader_callback_vtbl;
>>> +    impl->filter = filter;
>>> +    impl->ref = 1;
>>> +
>>> +    *out = &impl->IWMReaderCallback_iface;
>>> +    return S_OK;
>>> +}
>> Can we put the IWMReaderCallback interface inside of struct asf_reader,
>> instead of making this a separate object?
>> ```
> 
> No, the reader will hold a ref on it and it would prevent filter destruction otherwise.
> 

If it's the same object, the reader shouldn't be holding a reference. In 
fact I think they should be able to share the same refcount.



More information about the wine-devel mailing list