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

Alexandre Julliard julliard at winehq.org
Mon Apr 20 15:48:20 CDT 2020


Module: wine
Branch: master
Commit: f71deb066f010bebad9ef1941c22666b029af00b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f71deb066f010bebad9ef1941c22666b029af00b

Author: Paul Gofman <pgofman at 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 at codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at 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;
 




More information about the wine-cvs mailing list