quartz/filesource: Check for past EOF read in _Request().

On Vista+ ReadFile() returns FALSE and sets ERROR_IO_PENDING even if the
requested read results in ERROR_HANDLE_EOF.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Paul Gofman 2020-04-20 02:05:59 +03:00 committed by Alexandre Julliard
parent e004905044
commit f71deb066f
1 changed files with 3 additions and 0 deletions

View File

@ -723,6 +723,9 @@ static HRESULT WINAPI FileAsyncReader_Request(IAsyncReader *iface, IMediaSample
if (FAILED(hr = IMediaSample_GetTime(sample, &start, &end)))
return hr;
if (BYTES_FROM_MEDIATIME(start) >= filter->file_size.QuadPart)
return HRESULT_FROM_WIN32(ERROR_HANDLE_EOF);
if (FAILED(hr = IMediaSample_GetPointer(sample, &data)))
return hr;