Commit ee7b3172 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfreadwrite: Block recurring flush calls in async mode when flush is pending.

parent 42edc14e
......@@ -1710,6 +1710,9 @@ static HRESULT source_reader_flush_async(struct source_reader *reader, unsigned
unsigned int stream_index;
HRESULT hr;
if (reader->flags & SOURCE_READER_FLUSHING)
return MF_E_INVALIDREQUEST;
switch (index)
{
case MF_SOURCE_READER_FIRST_VIDEO_STREAM:
......
......@@ -951,6 +951,13 @@ todo_wine
hr = IMFSourceReader_ReadSample(reader, 0, 0, NULL, NULL, NULL, &sample);
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
/* Flush() arguments validation. */
hr = IMFSourceReader_Flush(reader, 123);
ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
hr = IMFSourceReader_ReadSample(reader, 0, 0, NULL, NULL, NULL, NULL);
ok(hr == MF_E_NOTACCEPTING, "Unexpected hr %#x.\n", hr);
IMFSourceReader_Release(reader);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment