Module: wine Branch: master Commit: c46bdc947322f3555cd68487f97047483607df0d URL: https://source.winehq.org/git/wine.git/?a=commit;h=c46bdc947322f3555cd68487f... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 26 08:09:42 2019 +0300 mfplat: Fix return value for IsCompressedFormat(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 e64dd3d..2c2c83e 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 779a76a..f62136f 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);