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

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2019-03-18 13:00:58 +03:00 committed by Alexandre Julliard
parent ced0a1de7e
commit 98500d8dbb

View file

@ -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);