[PATCH 2/3] mf/evr: Add default attributes on sink creation.

Nikolay Sivov nsivov at codeweavers.com
Thu Oct 15 08:19:54 CDT 2020


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 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);
 
-- 
2.28.0




More information about the wine-devel mailing list