quartz: More filesource fixes.
After a flush call there should be no more samples in the buffer.
This commit is contained in:
parent
4afc2ae951
commit
c4cdfdac35
@ -1166,6 +1166,7 @@ static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader * iface, DWORD dw
|
|||||||
|
|
||||||
if (buffer >= This->samples)
|
if (buffer >= This->samples)
|
||||||
{
|
{
|
||||||
|
if (buffer != This->samples)
|
||||||
FIXME("Returned: %u (%08x)\n", buffer, GetLastError());
|
FIXME("Returned: %u (%08x)\n", buffer, GetLastError());
|
||||||
hr = VFW_E_TIMEOUT;
|
hr = VFW_E_TIMEOUT;
|
||||||
buffer = ~0;
|
buffer = ~0;
|
||||||
@ -1188,7 +1189,7 @@ static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader * iface, DWORD dw
|
|||||||
if (buffer == This->samples)
|
if (buffer == This->samples)
|
||||||
{
|
{
|
||||||
assert(!This->queued_number);
|
assert(!This->queued_number);
|
||||||
hr = E_FAIL;
|
hr = VFW_E_TIMEOUT;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1342,12 +1343,16 @@ static HRESULT WINAPI FileAsyncReader_BeginFlush(IAsyncReader * iface)
|
|||||||
static HRESULT WINAPI FileAsyncReader_EndFlush(IAsyncReader * iface)
|
static HRESULT WINAPI FileAsyncReader_EndFlush(IAsyncReader * iface)
|
||||||
{
|
{
|
||||||
FileAsyncReader *This = impl_from_IAsyncReader(iface);
|
FileAsyncReader *This = impl_from_IAsyncReader(iface);
|
||||||
|
int x;
|
||||||
|
|
||||||
TRACE("()\n");
|
TRACE("()\n");
|
||||||
|
|
||||||
EnterCriticalSection(&This->csList);
|
EnterCriticalSection(&This->csList);
|
||||||
ResetEvent(This->handle_list[This->samples]);
|
ResetEvent(This->handle_list[This->samples]);
|
||||||
This->bFlushing = FALSE;
|
This->bFlushing = FALSE;
|
||||||
|
for (x = 0; x < This->samples; ++x)
|
||||||
|
assert(!This->sample_list[x].pSample);
|
||||||
|
|
||||||
LeaveCriticalSection(&This->csList);
|
LeaveCriticalSection(&This->csList);
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user