Maarten Lankhorst : quartz: More filesource fixes.
Alexandre Julliard
julliard at winehq.org
Thu May 1 06:39:09 CDT 2008
Module: wine
Branch: master
Commit: c4cdfdac35928cb4a6ad867078f01a9d2398092a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c4cdfdac35928cb4a6ad867078f01a9d2398092a
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Wed Apr 30 14:27:51 2008 -0700
quartz: More filesource fixes.
After a flush call there should be no more samples in the buffer.
---
dlls/quartz/filesource.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c
index 1ac37b0..f410b56 100644
--- a/dlls/quartz/filesource.c
+++ b/dlls/quartz/filesource.c
@@ -1166,7 +1166,8 @@ static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader * iface, DWORD dw
if (buffer >= This->samples)
{
- FIXME("Returned: %u (%08x)\n", buffer, GetLastError());
+ if (buffer != This->samples)
+ FIXME("Returned: %u (%08x)\n", buffer, GetLastError());
hr = VFW_E_TIMEOUT;
buffer = ~0;
}
@@ -1188,7 +1189,7 @@ static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader * iface, DWORD dw
if (buffer == This->samples)
{
assert(!This->queued_number);
- hr = E_FAIL;
+ hr = VFW_E_TIMEOUT;
}
else
{
@@ -1342,12 +1343,16 @@ static HRESULT WINAPI FileAsyncReader_BeginFlush(IAsyncReader * iface)
static HRESULT WINAPI FileAsyncReader_EndFlush(IAsyncReader * iface)
{
FileAsyncReader *This = impl_from_IAsyncReader(iface);
+ int x;
TRACE("()\n");
EnterCriticalSection(&This->csList);
ResetEvent(This->handle_list[This->samples]);
This->bFlushing = FALSE;
+ for (x = 0; x < This->samples; ++x)
+ assert(!This->sample_list[x].pSample);
+
LeaveCriticalSection(&This->csList);
return S_OK;
More information about the wine-cvs
mailing list