[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-patches
Subject: quartz: More filesource fixes
From: "Maarten Lankhorst" <m.b.lankhorst () gmail ! com>
Date: 2008-04-30 22:17:54
Message-ID: b130c85e0804301517p2add4b43m2cf83a372d802124 () mail ! gmail ! com
[Download RAW message or body]
After a flush call there should be no more samples in the buffer.
["0002-quartz-Final-filesource-fixes.txt" (text/plain)]
From c3a77c4dc0b13338311b3052f48c35e23d7eb66c Mon Sep 17 00:00:00 2001
From: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Date: Wed, 30 Apr 2008 14:27:51 -0700
Subject: [PATCH] quartz: Final filesource fixes
After a flush there should be no more samples in a buffer, this code takes care of it
---
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;
--
1.5.4.1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic