mf/evr: Add default attributes on sink creation.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-10-15 16:19:54 +03:00 committed by Alexandre Julliard
parent f0c2b0d2fc
commit 602a3085e3
2 changed files with 12 additions and 1 deletions

View File

@ -1896,6 +1896,18 @@ static HRESULT evr_create_object(IMFAttributes *attributes, void *user_context,
IMFTransform_Release(mixer);
IMFVideoPresenter_Release(presenter);
/* Default attributes */
IMFAttributes_SetUINT32(object->attributes, &EVRConfig_ForceBob, 0);
IMFAttributes_SetUINT32(object->attributes, &EVRConfig_AllowDropToBob, 0);
IMFAttributes_SetUINT32(object->attributes, &EVRConfig_ForceThrottle, 0);
IMFAttributes_SetUINT32(object->attributes, &EVRConfig_AllowDropToThrottle, 0);
IMFAttributes_SetUINT32(object->attributes, &EVRConfig_ForceHalfInterlace, 0);
IMFAttributes_SetUINT32(object->attributes, &EVRConfig_AllowDropToHalfInterlace, 0);
IMFAttributes_SetUINT32(object->attributes, &EVRConfig_ForceScaling, 0);
IMFAttributes_SetUINT32(object->attributes, &EVRConfig_AllowScaling, 0);
IMFAttributes_SetUINT32(object->attributes, &EVRConfig_ForceBatching, 0);
IMFAttributes_SetUINT32(object->attributes, &EVRConfig_AllowBatching, 0);
*obj = (IUnknown *)&object->IMFMediaSink_iface;
return S_OK;

View File

@ -3291,7 +3291,6 @@ static void test_evr(void)
IUnknown_Release(unk);
hr = IMFAttributes_GetCount(attributes, &count);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
todo_wine
ok(!!count, "Unexpected count %u.\n", count);
IMFAttributes_Release(attributes);