Fix return value for StdMediaSample2_GetTime in error cases.

Gerald Pfeifer gerald at pfeifer.com
Sat Apr 24 16:00:54 CDT 2010


Looking at this code, we set hr to different values depending on
the flow of the function, but then always return S_OK.  That does
not strike me as correct?

(The code seems to date back to 2003-09-11.)

Gerald

---
 dlls/quartz/memallocator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c
index 7f799c9..16b94e3 100644
--- a/dlls/quartz/memallocator.c
+++ b/dlls/quartz/memallocator.c
@@ -534,7 +534,7 @@ static HRESULT WINAPI StdMediaSample2_GetTime(IMediaSample2 * iface, REFERENCE_T
         hr = S_OK;
     }
 
-    return S_OK;
+    return hr;
 }
 
 static HRESULT WINAPI StdMediaSample2_SetTime(IMediaSample2 * iface, REFERENCE_TIME * pStart, REFERENCE_TIME * pEnd)
-- 
1.6.6.2



More information about the wine-patches mailing list