Nikolay Sivov : mfplat: Take a shortcut when comparing attribute with mismatching type.
Module: wine Branch: master Commit: 98500d8dbbc86fc06adbea2460423a5b30df9617 URL: https://source.winehq.org/git/wine.git/?a=commit;h=98500d8dbbc86fc06adbea246... Author: Nikolay Sivov <nsivov(a)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(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)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);
participants (1)
-
Alexandre Julliard