[PATCH 3/6] mfplat: Take a shortcut when comparing attribute with mismatching type.

Nikolay Sivov nsivov at codeweavers.com
Mon Mar 18 05:00:58 CDT 2019


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/mfplat/main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index 7481b77f48..00245314fe 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -757,7 +757,10 @@ static HRESULT WINAPI mfattributes_CompareItem(IMFAttributes *iface, REFGUID key
     EnterCriticalSection(&attributes->cs);
 
     if ((attribute = attributes_find_item(attributes, key, NULL)))
-        *result = !PropVariantCompareEx(&attribute->value, value, PVCU_DEFAULT, PVCF_DEFAULT);
+    {
+        *result = attribute->value.vt == value->vt &&
+                !PropVariantCompareEx(&attribute->value, value, PVCU_DEFAULT, PVCF_DEFAULT);
+    }
 
     LeaveCriticalSection(&attributes->cs);
 
-- 
2.20.1




More information about the wine-devel mailing list