Nikolay Sivov : mf/evr: Add default attributes on sink creation.
Module: wine Branch: master Commit: 602a3085e3630487b5a1957c1e4a9aab2cbed343 URL: https://source.winehq.org/git/wine.git/?a=commit;h=602a3085e3630487b5a1957c1... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Oct 15 16:19:54 2020 +0300 mf/evr: Add default attributes on sink creation. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/evr.c | 12 ++++++++++++ dlls/mf/tests/mf.c | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c index 7665725405e..af9bd9e0e42 100644 --- a/dlls/mf/evr.c +++ b/dlls/mf/evr.c @@ -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; diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index fa3d8111338..465bd7e3c43 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -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);
participants (1)
-
Alexandre Julliard