[PATCH] amstream: Fix return value of BasePinImp_GetMediaType.

Christian Costa titan.costa at gmail.com
Tue Nov 27 02:14:13 CST 2012


---
 dlls/amstream/mediastreamfilter.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/dlls/amstream/mediastreamfilter.c b/dlls/amstream/mediastreamfilter.c
index 3c0777c..afd080a 100644
--- a/dlls/amstream/mediastreamfilter.c
+++ b/dlls/amstream/mediastreamfilter.c
@@ -181,15 +181,14 @@ static HRESULT WINAPI BasePinImp_GetMediaType(BasePin *This, int index, AM_MEDIA
     }
     else if (IsEqualGUID(&purpose_id, &MSPID_PrimaryAudio))
     {
-        if (!index)
-        {
-            amt->majortype = MEDIATYPE_Audio;
-            amt->subtype = MEDIASUBTYPE_PCM;
-            return S_OK;
-        }
+        if (index)
+            return S_FALSE;
+
+         amt->majortype = MEDIATYPE_Audio;
+         amt->subtype = MEDIASUBTYPE_PCM;
     }
 
-    return S_FALSE;
+    return S_OK;
 }
 
 static const  BasePinFuncTable input_BaseFuncTable = {




More information about the wine-patches mailing list