[PATCH 5/5] qcap/smartteefilter: Return VFW_S_CANT_CUE from GetState() if paused.
Zebediah Figura
z.figura12 at gmail.com
Mon Jul 13 17:37:19 CDT 2020
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
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 5b4add0b5db..2f6f3ab2b79 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 2f8fa6c4b5e..f3a44c67c1f 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);
--
2.27.0
More information about the wine-devel
mailing list