quartz: Fix deadlock with transform filter

Alexandre Julliard julliard at winehq.org
Mon Jul 7 04:39:06 CDT 2008


"Maarten Lankhorst" <m.b.lankhorst at gmail.com> writes:

> diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c
> index d877930..22bfb87 100644
> --- a/dlls/quartz/acmwrapper.c
> +++ b/dlls/quartz/acmwrapper.c
> @@ -186,7 +186,9 @@ static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilte
>          }
>          TRACE("Sample stop time: %u.%03u\n", (DWORD)(tStart/10000000), (DWORD)((tStart/10000)%1000));
>  
> +        LeaveCriticalSection(&This->tf.csFilter);
>          hr = OutputPin_SendSample((OutputPin*)This->tf.ppPins[1], pOutSample);
> +        EnterCriticalSection(&This->tf.csFilter);

This looks very wrong this the lock wasn't grabbed by this function, it
will violate expectations of the caller. It looks like the locking
strategy needs some more thought.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list