Module: wine Branch: master Commit: 484fdcf7e446aaab859eba1b9ae79d689241592a URL: http://source.winehq.org/git/wine.git/?a=commit;h=484fdcf7e446aaab859eba1b9a... Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Thu Jul 10 14:32:58 2008 -0700 quartz: End the flush downstream first before restarting playback in pullpin. --- dlls/quartz/pin.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index bb562ad..e45db96 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -1783,6 +1783,11 @@ HRESULT WINAPI PullPin_EndFlush(IPin * iface) TRACE("(%p)->()\n", iface); + /* Send further first: Else a race condition might terminate processing early */ + EnterCriticalSection(This->pin.pCritSec); + SendFurther( iface, deliver_endflush, NULL, NULL ); + LeaveCriticalSection(This->pin.pCritSec); + EnterCriticalSection(&This->thread_lock); { FILTER_STATE state; @@ -1795,10 +1800,6 @@ HRESULT WINAPI PullPin_EndFlush(IPin * iface) } LeaveCriticalSection(&This->thread_lock); - EnterCriticalSection(This->pin.pCritSec); - SendFurther( iface, deliver_endflush, NULL, NULL ); - LeaveCriticalSection(This->pin.pCritSec); - return S_OK; }