[PATCH] quartz/tests: Fix some tests on w7u.

Zebediah Figura z.figura12 at gmail.com
Fri Nov 22 12:52:33 CST 2019


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/quartz/tests/vmr7.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c
index 29a4bea781..dd2e9ace97 100644
--- a/dlls/quartz/tests/vmr7.c
+++ b/dlls/quartz/tests/vmr7.c
@@ -1048,9 +1048,9 @@ static HANDLE send_frame(IMemInputPin *sink)
 
     hr = IMediaSample_GetPointer(sample, &data);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
-    memset(data, 0x55, 32 * 16 * 4);
+    memset(data, 0x55, IMediaSample_GetSize(sample));
 
-    hr = IMediaSample_SetActualDataLength(sample, 32 * 16 * 4);
+    hr = IMediaSample_SetActualDataLength(sample, IMediaSample_GetSize(sample));
     ok(hr == S_OK, "Got hr %#x.\n", hr);
 
     start_time = 0;
@@ -1307,6 +1307,9 @@ static void test_current_image(IBaseFilter *filter, IMemInputPin *input,
     HRESULT hr;
     LONG size;
 
+    /* Note that the bitmap returned by GetCurrentImage() has a bit depth of
+     * 32 regardless of the format used for pin connection. */
+    expect_bih.biBitCount = 32;
     expect_bih.biSizeImage = 32 * 16 * 4;
 
     IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control);
@@ -1450,6 +1453,10 @@ static void test_connect_pin(void)
     {
         vih.bmiHeader.biBitCount = 24;
         hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt);
+        /* w7u is also rather buggy with its allocator. Requesting a size of
+         * 32 * 16 * 4 succeeds and returns that size from SetProperties(), but
+         * the actual samples only have a size of 32 * 16 * 3. */
+        req_props.cbBuffer = 32 * 16 * 3;
     }
     ok(hr == S_OK, "Got hr %#x.\n", hr);
     hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface);
-- 
2.24.0




More information about the wine-devel mailing list