From 4edb4b34750615b04f8eb4ea1e681e94f9ea76da Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 7 Apr 2008 22:34:21 -0700 Subject: [PATCH] quartz: Make a pullpin send a BeginFlush BEFORE pausing the thread This makes seeking a whole lot faster because pausing because waiting for a state change to finish will take more time otherwise --- dlls/quartz/pin.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index 8ec39be..7d54a51 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -1595,6 +1595,12 @@ HRESULT WINAPI PullPin_BeginFlush(IPin * iface) PullPin *This = (PullPin *)iface; TRACE("(%p)->()\n", iface); + EnterCriticalSection(This->pin.pCritSec); + { + SendFurther( iface, deliver_beginflush, NULL, NULL ); + } + LeaveCriticalSection(This->pin.pCritSec); + EnterCriticalSection(&This->thread_lock); { if (This->state == State_Running) @@ -1607,8 +1613,6 @@ HRESULT WINAPI PullPin_BeginFlush(IPin * iface) EnterCriticalSection(This->pin.pCritSec); { This->fnCleanProc(This->pin.pUserData); - - SendFurther( iface, deliver_beginflush, NULL, NULL ); } LeaveCriticalSection(This->pin.pCritSec); -- 1.5.4.1