qasf/dmowrapper: Return VFW_E_WRONG_STATE in dmo_wrapper_sink_Receive.

This commit is contained in:
Ziqing Hui 2024-05-16 18:14:57 +08:00 committed by Alexandre Julliard
parent c6f4d04697
commit 86de254ecd
2 changed files with 3 additions and 2 deletions

View file

@ -309,6 +309,9 @@ static HRESULT WINAPI dmo_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
DWORD flags = 0;
HRESULT hr;
if (filter->filter.state == State_Stopped)
return VFW_E_WRONG_STATE;
IUnknown_QueryInterface(filter->dmo, &IID_IMediaObject, (void **)&dmo);
if (IMediaSample_IsDiscontinuity(sample) == S_OK)

View file

@ -1716,12 +1716,10 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input,
hr = IBaseFilter_Stop(dmo_filter);
ok(hr == S_OK, "Stop returned %#lx.\n", hr);
hr = IMemInputPin_Receive(input, sample);
todo_wine
ok(hr == VFW_E_WRONG_STATE, "Receive returned %#lx.\n", hr);
ok(got_ProcessInput == 0, "Got %u calls to ProcessInput().\n", got_ProcessInput);
ok(got_ProcessOutput == 0, "Got %u calls to ProcessOutput().\n", got_ProcessOutput);
ok(got_Receive == 0, "Got %u calls to Receive().\n", got_Receive);
todo_wine
ok(got_Discontinuity == 0, "Got %u calls to Discontinuity().\n", got_Discontinuity);
hr = IMediaControl_Run(control);
ok(hr == S_OK, "Run returned %#lx.\n", hr);