[PATCH 3/3] mfplat: Fix return value for IsCompressedFormat().
Nikolay Sivov
nsivov at codeweavers.com
Tue Mar 26 00:09:42 CDT 2019
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/mfplat/mediatype.c | 9 +++++----
dlls/mfplat/tests/mfplat.c | 1 -
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/mfplat/mediatype.c b/dlls/mfplat/mediatype.c
index e64dd3da63..2c2c83e8de 100644
--- a/dlls/mfplat/mediatype.c
+++ b/dlls/mfplat/mediatype.c
@@ -318,17 +318,18 @@ static HRESULT WINAPI mediatype_IsCompressedFormat(IMFMediaType *iface, BOOL *co
{
struct media_type *media_type = impl_from_IMFMediaType(iface);
UINT32 value;
- HRESULT hr;
TRACE("%p, %p.\n", iface, compressed);
- hr = IMFAttributes_GetUINT32(&media_type->attributes.IMFAttributes_iface, &MF_MT_ALL_SAMPLES_INDEPENDENT, &value);
- if (FAILED(hr))
+ if (FAILED(IMFAttributes_GetUINT32(&media_type->attributes.IMFAttributes_iface,
+ &MF_MT_ALL_SAMPLES_INDEPENDENT, &value)))
+ {
value = 0;
+ }
*compressed = !value;
- return hr;
+ return S_OK;
}
static HRESULT WINAPI mediatype_IsEqual(IMFMediaType *iface, IMFMediaType *type, DWORD *flags)
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c
index 779a76aff2..f62136f4ad 100644
--- a/dlls/mfplat/tests/mfplat.c
+++ b/dlls/mfplat/tests/mfplat.c
@@ -355,7 +355,6 @@ if(0)
compressed = FALSE;
hr = IMFMediaType_IsCompressedFormat(mediatype, &compressed);
-todo_wine
ok(hr == S_OK, "Failed to get media type property, hr %#x.\n", hr);
ok(compressed, "Unexpected value %d.\n", compressed);
--
2.20.1
More information about the wine-devel
mailing list