Module: wine Branch: master Commit: f71deb066f010bebad9ef1941c22666b029af00b URL: https://source.winehq.org/git/wine.git/?a=commit;h=f71deb066f010bebad9ef1941...
Author: Paul Gofman pgofman@codeweavers.com Date: Mon Apr 20 02:05:59 2020 +0300
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
---
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;