[1/2] qcap: Distinguish interface and implementation pointer for VfwCapture output pin.

Nikolay Sivov bunglehead at gmail.com
Mon Jun 29 02:09:40 CDT 2015


On 29.06.2015 9:08, Sebastian Lackner wrote:
> -        BasePin *pin;
> +        VfwPinImpl *pin;
>
>           TRACE("destroying everything\n");
>           if (This->init)
> @@ -226,10 +236,10 @@ static ULONG WINAPI VfwCapture_Release(IBaseFilter * iface)
>                   qcap_driver_stop(This->driver_info, &This->filter.state);
>               qcap_driver_destroy(This->driver_info);
>           }
> -        pin = (BasePin*) This->pOutputPin;
> -        if (pin->pConnectedTo != NULL)
> +        pin = impl_from_IPin(This->pOutputPin);
> +        if (pin->pin.pin.pConnectedTo != NULL)
>           {
> -            IPin_Disconnect(pin->pConnectedTo);
> +            IPin_Disconnect(pin->pin.pin.pConnectedTo);

This is not better than it is now, 'pOutputPin' is IPin* so you should 
be using public methods.

>      if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPin))
> -        *ppv = This;
> +        *ppv = &This->pin.pin.IPin_iface;

This could as well say 'iface'.



More information about the wine-devel mailing list