From: Ziqing Hui zhui@codeweavers.com
--- dlls/qasf/dmowrapper.c | 11 ++++++++--- dlls/qasf/tests/dmowrapper.c | 4 ---- 2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/qasf/dmowrapper.c b/dlls/qasf/dmowrapper.c index dc3f02d164b..8d2d24cc12f 100644 --- a/dlls/qasf/dmowrapper.c +++ b/dlls/qasf/dmowrapper.c @@ -305,9 +305,9 @@ static HRESULT WINAPI dmo_wrapper_sink_Receive(struct strmbase_sink *iface, IMed struct dmo_wrapper *filter = impl_from_strmbase_filter(iface->pin.filter); DWORD index = iface - filter->sinks; REFERENCE_TIME start = 0, stop = 0; + HRESULT process_hr, hr; IMediaObject *dmo; DWORD flags = 0; - HRESULT hr;
if (filter->filter.state == State_Stopped) return VFW_E_WRONG_STATE; @@ -329,7 +329,11 @@ static HRESULT WINAPI dmo_wrapper_sink_Receive(struct strmbase_sink *iface, IMed * states that we should call ProcessOutput() again in this case. */ if (FAILED(hr = get_output_samples(filter))) goto out; - process_output(filter, dmo); + if (FAILED(process_hr = process_output(filter, dmo))) + { + hr = process_hr; + goto out; + } }
if (FAILED(hr = get_output_samples(filter))) @@ -353,7 +357,8 @@ static HRESULT WINAPI dmo_wrapper_sink_Receive(struct strmbase_sink *iface, IMed goto out; }
- process_output(filter, dmo); + if (FAILED(process_hr = process_output(filter, dmo))) + hr = process_hr;
out: filter->input_buffer.sample = NULL; diff --git a/dlls/qasf/tests/dmowrapper.c b/dlls/qasf/tests/dmowrapper.c index bfa107626cf..78d138b104e 100644 --- a/dlls/qasf/tests/dmowrapper.c +++ b/dlls/qasf/tests/dmowrapper.c @@ -1756,13 +1756,9 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input, /* Test receive if downstream receive fails. */ testmode = 14; hr = IMemInputPin_Receive(input, sample); - todo_wine ok(hr == E_FAIL, "Receive returned %#lx.\n", hr); - todo_wine ok(got_ProcessInput == 0, "Got %u calls to ProcessInput().\n", got_ProcessInput); - todo_wine ok(got_ProcessOutput == 1, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); - todo_wine ok(got_Receive == 1, "Got %u calls to Receive().\n", got_Receive); ok(got_Discontinuity == 1, "Got %u calls to Discontinuity().\n", got_Discontinuity); got_ProcessInput = got_ProcessOutput = got_Receive = got_Discontinuity = 0;