forked from Mirrors/wine-wine
mfreadwrite: Block recurring flush calls in async mode when flush is pending.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>feature/deterministic
parent
42edc14e04
commit
ee7b317293
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue