From e03b98ec68806a69e17c57e6cbe2aefee4910adc Mon Sep 17 00:00:00 2001 From: Paul Chitescu Date: Wed, 23 Dec 2009 19:55:13 +0200 Subject: [PATCH] quartz: Only wait in IMediaEvent::WaitForCompletion if the filter is running. --- dlls/quartz/filtergraph.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 5377281083..3e9a1da1b8 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -4899,6 +4899,9 @@ static HRESULT WINAPI MediaEvent_WaitForCompletion(IMediaEventEx *iface, TRACE("(%p/%p)->(%d, %p)\n", This, iface, msTimeout, pEvCode); + if (This->state != State_Running) + return VFW_E_WRONG_STATE; + if (WaitForSingleObject(This->hEventCompletion, msTimeout) == WAIT_OBJECT_0) { *pEvCode = This->CompletionStatus; -- 2.32.0.93.g670b81a890