[PATCH 3/4] quartz: Change VideoRenderer_Run to handle EndOfStream slightly better

Maarten Lankhorst m.b.lankhorst at gmail.com
Wed Nov 24 11:23:55 CST 2010


---
 dlls/quartz/videorenderer.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c
index 112289a..d26ecb5 100644
--- a/dlls/quartz/videorenderer.c
+++ b/dlls/quartz/videorenderer.c
@@ -821,19 +821,17 @@ static HRESULT WINAPI VideoRenderer_Run(IBaseFilter * iface, REFERENCE_TIME tSta
     EnterCriticalSection(&This->filter.csFilter);
     if (This->filter.state == State_Running)
         goto out;
-    if (This->pInputPin->pin.pConnectedTo)
+    This->filter.rtStreamStart = tStart;
+    QualityControlRender_Start(&This->qcimpl, tStart);
+    if (This->pInputPin->pin.pConnectedTo && (This->filter.state == State_Stopped || !This->pInputPin->end_of_stream))
     {
         if (This->filter.state == State_Stopped)
         {
-            This->pInputPin->end_of_stream = 0;
             ResetEvent(This->hEvent);
             VideoRenderer_AutoShowWindow(This);
+            This->pInputPin->end_of_stream = 0;
         }
         SetEvent(This->blocked);
-
-        This->filter.rtStreamStart = tStart;
-        This->filter.state = State_Running;
-        QualityControlRender_Start(&This->qcimpl, tStart);
     } else if (This->filter.filterInfo.pGraph) {
         IMediaEventSink *pEventSink;
         hr = IFilterGraph_QueryInterface(This->filter.filterInfo.pGraph, &IID_IMediaEventSink, (LPVOID*)&pEventSink);
-- 
1.7.1




More information about the wine-patches mailing list