Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfplat/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 8303bf2f74..13c48cfe23 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -1260,9 +1260,9 @@ HRESULT attributes_GetString(struct attributes *attributes, REFGUID key, WCHAR * *length = len;
if (size <= len) - return STRSAFE_E_INSUFFICIENT_BUFFER; - - memcpy(value, attribute->value.u.pwszVal, (len + 1) * sizeof(WCHAR)); + hr = STRSAFE_E_INSUFFICIENT_BUFFER; + else + memcpy(value, attribute->value.u.pwszVal, (len + 1) * sizeof(WCHAR)); } else hr = MF_E_INVALIDTYPE;
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfplat/queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/mfplat/queue.c b/dlls/mfplat/queue.c index c2cc6233b5..36c50566d3 100644 --- a/dlls/mfplat/queue.c +++ b/dlls/mfplat/queue.c @@ -1066,7 +1066,8 @@ static HRESULT WINAPI periodic_callback_Invoke(IMFAsyncCallback *iface, IMFAsync struct periodic_callback *callback = impl_from_IMFAsyncCallback(iface); IUnknown *context = NULL;
- IMFAsyncResult_GetObject(result, &context); + if (FAILED(IMFAsyncResult_GetObject(result, &context))) + WARN("Expected object to be set for result object.\n");
callback->callback(context);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfplat/tests/mfplat.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index f081d976d7..176f339022 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -308,7 +308,8 @@ static void test_source_resolver(void)
IMFSourceResolver_Release(resolver);
- MFShutdown(); + hr = MFShutdown(); + ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr);
DeleteFileW(filename); } @@ -1787,7 +1788,7 @@ static void test_allocate_queue(void) ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = MFShutdown(); - ok(hr == S_OK, "Failed to shutdown, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); }
static void test_MFCopyImage(void) @@ -2074,7 +2075,8 @@ static void test_periodic_callback(void) if (!pMFAddPeriodicCallback) { win_skip("Periodic callbacks are not supported.\n"); - MFShutdown(); + hr = MFShutdown(); + ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); return; }
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=50600
Your paranoid android.
=== debian9 (32 bit report) ===
mfplat: mfplat.c:2419: Test failed: Unexpected refcount 1. Unhandled exception: page fault on read access to 0x00000009 in 32-bit code (0x7e73da6a).
Report errors: mfplat:mfplat crashed (c0000005)
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfreadwrite/tests/mfplat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/mfreadwrite/tests/mfplat.c b/dlls/mfreadwrite/tests/mfplat.c index 5f664b354c..490b84d1fc 100644 --- a/dlls/mfreadwrite/tests/mfplat.c +++ b/dlls/mfreadwrite/tests/mfplat.c @@ -120,5 +120,6 @@ START_TEST(mfplat) test_MFCreateSourceReaderFromByteStream(); test_factory();
- MFShutdown(); + hr = MFShutdown(); + ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); }
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfreadwrite/tests/mfplat.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/mfreadwrite/tests/mfplat.c b/dlls/mfreadwrite/tests/mfplat.c index 490b84d1fc..c031ddc9bd 100644 --- a/dlls/mfreadwrite/tests/mfplat.c +++ b/dlls/mfreadwrite/tests/mfplat.c @@ -79,10 +79,8 @@ static void test_MFCreateSourceReaderFromByteStream(void) todo_wine ok(hr == S_OK || hr == MF_E_UNSUPPORTED_BYTESTREAM_TYPE, "got 0x%08x\n", hr);
- if(stream) - IStream_Release(stream); - if(bytestream) - IMFByteStream_Release(bytestream); + IStream_Release(stream); + IMFByteStream_Release(bytestream); IMFAttributes_Release(attributes); if(source) IMFSourceReader_Release(source);