mfplat: Fix return value for IsCompressedFormat().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Nikolay Sivov 2019-03-26 08:09:42 +03:00 committed by Alexandre Julliard
parent b00be28968
commit c46bdc9473
2 changed files with 5 additions and 5 deletions

View File

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

View File

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