[PATCH] strmbase: Avoid using HRESULT codes as BOOL value (PVS-Studio)

Nikolay Sivov nsivov at codeweavers.com
Fri Oct 16 02:17:59 CDT 2015


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---

My understanding is that if pin can block then we should use additional thread
for it. Currently because of S_OK/S_FALSE values logic is inverted.

 dlls/strmbase/outputqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/strmbase/outputqueue.c b/dlls/strmbase/outputqueue.c
index cbcd964..36960e3 100644
--- a/dlls/strmbase/outputqueue.c
+++ b/dlls/strmbase/outputqueue.c
@@ -101,7 +101,7 @@ HRESULT WINAPI OutputQueue_Construct(
 
     EnterCriticalSection(&This->csQueue);
     if (bAuto && pInputPin->pMemInputPin)
-        threaded = IMemInputPin_ReceiveCanBlock(pInputPin->pMemInputPin);
+        threaded = IMemInputPin_ReceiveCanBlock(pInputPin->pMemInputPin) == S_OK;
     else
         threaded = bQueue;
 
-- 
2.6.1




More information about the wine-patches mailing list