Nikolay Sivov : mfplat: Take a shortcut when comparing attribute with mismatching type.

Alexandre Julliard julliard at winehq.org
Mon Mar 18 16:20:15 CDT 2019


Module: wine
Branch: master
Commit: 98500d8dbbc86fc06adbea2460423a5b30df9617
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=98500d8dbbc86fc06adbea2460423a5b30df9617

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Mar 18 13:00:58 2019 +0300

mfplat: Take a shortcut when comparing attribute with mismatching type.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 7481b77..0024531 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);
 




More information about the wine-cvs mailing list