On Vista+ ReadFile() returns FALSE and sets ERROR_IO_PENDING even if the requested read results in ERROR_HANDLE_EOF. This change fixes filesource test with Wine quartz.dll on Windows and avoids regression otherwise triggered by the next patch.
Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/quartz/filesource.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 8983f7317b..a553b8517e 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -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;