Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfplat/main.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 48e64adeef..6336b1b347 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -1349,14 +1349,23 @@ HRESULT attributes_GetDouble(struct attributes *attributes, REFGUID key, double
HRESULT attributes_GetGUID(struct attributes *attributes, REFGUID key, GUID *value) { - PROPVARIANT attrval; - HRESULT hr; + struct attribute *attribute; + HRESULT hr = S_OK;
- PropVariantInit(&attrval); - attrval.vt = VT_CLSID; - hr = attributes_get_item(attributes, key, &attrval); - if (SUCCEEDED(hr)) - *value = *attrval.u.puuid; + EnterCriticalSection(&attributes->cs); + + attribute = attributes_find_item(attributes, key, NULL); + if (attribute) + { + if (attribute->value.vt == MF_ATTRIBUTE_GUID) + *value = *attribute->value.u.puuid; + else + hr = MF_E_INVALIDTYPE; + } + else + hr = MF_E_ATTRIBUTENOTFOUND; + + LeaveCriticalSection(&attributes->cs);
return hr; }
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfplat/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 6336b1b347..e4ade7f202 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -1651,7 +1651,8 @@ HRESULT attributes_SetGUID(struct attributes *attributes, REFGUID key, REFGUID v { PROPVARIANT attrval;
- InitPropVariantFromCLSID(value, &attrval); + attrval.vt = VT_CLSID; + attrval.u.puuid = (CLSID *)value; return attributes_set_item(attributes, key, &attrval); }
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfplat/tests/mfplat.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index 832b52713c..1db4d2dcc4 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -1712,6 +1712,8 @@ todo_wine todo_wine ok(count == 1, "Unexpected buffer count %u.\n", count);
+ IMFMediaBuffer_Release(buffer); + IMFSample_Release(sample); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=60870
Your paranoid android.
=== w1064v1809_ar (32 bit report) ===
mfplat: mfplat.c:2386: Test failed: Unexpected return value 0x102. mfplat.c:1737: Test failed: Failed to get event, hr 0xc00d3e85. mfplat.c:1740: Test failed: Failed to get event, hr 0xc00d3e85. mfplat.c:1743: Test failed: Failed to finalize GetEvent, hr 0xc00d3e85. mfplat.c:1746: Test failed: Unexpected result, hr 0xc00d3e85. 0f74:mfplat: unhandled exception c0000005 at 0040891B