[PATCH 4/5] quartz/vmr9: Set the stream count to 4 in IVMRWindowlessControl9::SetVideoClippingWindow().

Zebediah Figura z.figura12 at gmail.com
Tue May 12 19:28:21 CDT 2020


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/quartz/tests/vmr9.c | 8 ++++----
 dlls/quartz/vmr9.c       | 5 ++++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c
index 2b6643a060b..25f66bc0a0c 100644
--- a/dlls/quartz/tests/vmr9.c
+++ b/dlls/quartz/tests/vmr9.c
@@ -3177,19 +3177,19 @@ static void test_mixing_mode(void)
     ok(hr == S_OK, "Got hr %#x.\n", hr);
 
     hr = IVMRFilterConfig9_GetNumberOfStreams(config, &stream_count);
-    todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
-    todo_wine ok(stream_count == 4, "Got %u streams.\n", stream_count);
+    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(stream_count == 4, "Got %u streams.\n", stream_count);
 
     hr = IBaseFilter_QueryInterface(filter, &IID_IVMRMixerControl9, (void **)&mixer_control);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
     IVMRMixerControl9_Release(mixer_control);
 
     hr = IVMRFilterConfig9_SetNumberOfStreams(config, 2);
-    todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr);
+    ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr);
 
     hr = IVMRFilterConfig9_GetNumberOfStreams(config, &stream_count);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
-    todo_wine ok(stream_count == 4, "Got %u streams.\n", stream_count);
+    ok(stream_count == 4, "Got %u streams.\n", stream_count);
 
     IVMRWindowlessControl9_Release(windowless_control);
     IVMRFilterConfig9_Release(config);
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index edcfe447323..73119431a67 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -1734,6 +1734,7 @@ static HRESULT WINAPI VMR9WindowlessControl_SetAspectRatioMode(IVMRWindowlessCon
 static HRESULT WINAPI VMR9WindowlessControl_SetVideoClippingWindow(IVMRWindowlessControl9 *iface, HWND window)
 {
     struct quartz_vmr *filter = impl_from_IVMRWindowlessControl9(iface);
+    HRESULT hr;
 
     TRACE("filter %p, window %p.\n", filter, window);
 
@@ -1754,8 +1755,10 @@ static HRESULT WINAPI VMR9WindowlessControl_SetVideoClippingWindow(IVMRWindowles
 
     filter->clipping_window = window;
 
+    hr = IVMRFilterConfig9_SetNumberOfStreams(&filter->IVMRFilterConfig9_iface, 4);
+
     LeaveCriticalSection(&filter->renderer.filter.csFilter);
-    return S_OK;
+    return hr;
 }
 
 static HRESULT WINAPI VMR9WindowlessControl_RepaintVideo(IVMRWindowlessControl9 *iface, HWND hwnd, HDC hdc)
-- 
2.26.2




More information about the wine-devel mailing list