[PATCH 1/7] quartz: Unset time in dsoundrender if it cannot be obtained

Maarten Lankhorst m.b.lankhorst at gmail.com
Mon Nov 29 03:44:13 CST 2010


Causes strange problems otherwise
---
 dlls/quartz/dsoundrender.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c
index 759ba07..bb7fc2d 100644
--- a/dlls/quartz/dsoundrender.c
+++ b/dlls/quartz/dsoundrender.c
@@ -342,8 +342,10 @@ static HRESULT WINAPI DSoundRender_Receive(BaseInputPin *pin, IMediaSample * pSa
     if (IMediaSample_GetMediaTime(pSample, &tStart, &tStop) == S_OK)
         MediaSeekingPassThru_RegisterMediaTime(This->seekthru_unk, tStart);
     hr = IMediaSample_GetTime(pSample, &tStart, &tStop);
-    if (FAILED(hr))
+    if (FAILED(hr)) {
         ERR("Cannot get sample time (%x)\n", hr);
+        tStart = tStop = -1;
+    }
 
     IMediaSample_IsDiscontinuity(pSample);
 
-- 
1.7.1




More information about the wine-patches mailing list