Zebediah Figura : quartz: Allow the arguments to IMediaSeeking::GetPositions() to be NULL.

Alexandre Julliard julliard at winehq.org
Thu Jul 23 16:36:57 CDT 2020


Module: wine
Branch: master
Commit: 11df839b69a37b001e05a2dae433209efd100c36
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=11df839b69a37b001e05a2dae433209efd100c36

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Wed Jul 22 18:29:21 2020 -0500

quartz: Allow the arguments to IMediaSeeking::GetPositions() to be NULL.

This allows "UNDER NIGHT IN-BIRTH Exe:Late" to render video.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/quartz/filtergraph.c       | 18 ++++++++++--------
 dlls/quartz/tests/filtergraph.c |  6 +++---
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 7d6463c1f3..b691fd79fc 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -2441,16 +2441,18 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG *
     return hr;
 }
 
-static HRESULT WINAPI MediaSeeking_GetPositions(IMediaSeeking *iface, LONGLONG *pCurrent,
-        LONGLONG *pStop)
+static HRESULT WINAPI MediaSeeking_GetPositions(IMediaSeeking *iface,
+        LONGLONG *current, LONGLONG *stop)
 {
-    struct filter_graph *This = impl_from_IMediaSeeking(iface);
-    HRESULT hr;
+    struct filter_graph *graph = impl_from_IMediaSeeking(iface);
+    HRESULT hr = S_OK;
 
-    TRACE("(%p/%p)->(%p, %p)\n", This, iface, pCurrent, pStop);
-    hr = IMediaSeeking_GetCurrentPosition(iface, pCurrent);
-    if (SUCCEEDED(hr))
-        hr = IMediaSeeking_GetStopPosition(iface, pStop);
+    TRACE("graph %p, current %p, stop %p.\n", graph, current, stop);
+
+    if (current)
+        hr = IMediaSeeking_GetCurrentPosition(iface, current);
+    if (SUCCEEDED(hr) && stop)
+        hr = IMediaSeeking_GetStopPosition(iface, stop);
 
     return hr;
 }
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index 9219b30cec..4fcd27b291 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -4098,14 +4098,14 @@ static void test_graph_seeking(void)
     ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
 
     hr = IMediaSeeking_GetPositions(seeking, NULL, NULL);
-    todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#x.\n", hr);
     hr = IMediaSeeking_GetPositions(seeking, NULL, &stop);
-    todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
+    ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
     hr = IMediaSeeking_GetPositions(seeking, &current, &stop);
     ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
     current = 0xdeadbeef;
     hr = IMediaSeeking_GetPositions(seeking, &current, NULL);
-    todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#x.\n", hr);
     ok(!current, "Got time %s.\n", wine_dbgstr_longlong(time));
 
     hr = IMediaSeeking_GetCurrentPosition(seeking, NULL);




More information about the wine-cvs mailing list