Zebediah Figura : qcap/smartteefilter: Return VFW_S_CANT_CUE from GetState() if paused.

Alexandre Julliard julliard at winehq.org
Tue Jul 14 16:23:37 CDT 2020


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon Jul 13 17:37:19 2020 -0500

qcap/smartteefilter: Return VFW_S_CANT_CUE from GetState() if paused.

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

---

 dlls/qcap/smartteefilter.c       | 6 ++++++
 dlls/qcap/tests/smartteefilter.c | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c
index 5b4add0b5d..2f6f3ab2b7 100644
--- a/dlls/qcap/smartteefilter.c
+++ b/dlls/qcap/smartteefilter.c
@@ -62,10 +62,16 @@ static void smart_tee_destroy(struct strmbase_filter *iface)
     CoTaskMemFree(filter);
 }
 
+static HRESULT smart_tee_wait_state(struct strmbase_filter *iface, DWORD timeout)
+{
+    return iface->state == State_Paused ? VFW_S_CANT_CUE : S_OK;
+}
+
 static const struct strmbase_filter_ops filter_ops =
 {
     .filter_get_pin = smart_tee_get_pin,
     .filter_destroy = smart_tee_destroy,
+    .filter_wait_state = smart_tee_wait_state,
 };
 
 static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *pmt)
diff --git a/dlls/qcap/tests/smartteefilter.c b/dlls/qcap/tests/smartteefilter.c
index 2f8fa6c4b5..f3a44c67c1 100644
--- a/dlls/qcap/tests/smartteefilter.c
+++ b/dlls/qcap/tests/smartteefilter.c
@@ -2232,7 +2232,7 @@ static void test_unconnected_filter_state(void)
     ok(hr == S_OK, "Got hr %#x.\n", hr);
 
     hr = IBaseFilter_GetState(filter, 0, &state);
-    todo_wine ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr);
+    ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr);
     ok(state == State_Paused, "Got state %u.\n", state);
 
     hr = IBaseFilter_Run(filter, 0);
@@ -2246,7 +2246,7 @@ static void test_unconnected_filter_state(void)
     ok(hr == S_OK, "Got hr %#x.\n", hr);
 
     hr = IBaseFilter_GetState(filter, 0, &state);
-    todo_wine ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr);
+    ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr);
     ok(state == State_Paused, "Got state %u.\n", state);
 
     hr = IBaseFilter_Stop(filter);




More information about the wine-cvs mailing list