Maarten Lankhorst : quartz: Fix return values in directsound renderer.

Alexandre Julliard julliard at winehq.org
Thu Jul 3 06:35:22 CDT 2008


Module: wine
Branch: master
Commit: e5767b1c023574c00a828fb02795a138064bf4e9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e5767b1c023574c00a828fb02795a138064bf4e9

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Wed Jul  2 20:08:46 2008 -0700

quartz: Fix return values in directsound renderer.

---

 dlls/quartz/dsoundrender.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c
index 1bdf390..e81acfb 100644
--- a/dlls/quartz/dsoundrender.c
+++ b/dlls/quartz/dsoundrender.c
@@ -243,11 +243,8 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample)
      * pause completion here, but for sound playing a single frame doesn't make sense
      */
 
-    if (This->state == State_Paused)
-        return S_FALSE;
-
     if (This->state == State_Stopped)
-        return S_FALSE;
+        return VFW_E_WRONG_STATE;
 
     hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
     if (FAILED(hr))
@@ -272,6 +269,9 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample)
         return S_OK;
     }
 
+    if (This->state == State_Paused)
+        return S_OK;
+
     cbSrcStream = IMediaSample_GetActualDataLength(pSample);
     TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, cbSrcStream);
 




More information about the wine-cvs mailing list