quartz: Make sure at least 1 sample is processed before returning.

This commit is contained in:
Maarten Lankhorst 2008-04-16 14:26:15 -07:00 committed by Alexandre Julliard
parent 405e21d558
commit 97b9e9c3ad
1 changed files with 6 additions and 2 deletions

View File

@ -1382,7 +1382,11 @@ static void CALLBACK PullPin_Thread_Process(ULONG_PTR iface)
TRACE("Start\n");
while (This->rtCurrent < This->rtStop && hr == S_OK && !This->stop_playback)
if (This->rtCurrent >= This->rtStop)
{
FIXME("Send an EndOfStream?\n");
}
else do
{
/* FIXME: to improve performance by quite a bit this should be changed
* so that one sample is processed while one sample is fetched. However,
@ -1427,7 +1431,7 @@ static void CALLBACK PullPin_Thread_Process(ULONG_PTR iface)
if (pSample)
IMediaSample_Release(pSample);
}
} while (This->rtCurrent < This->rtStop && hr == S_OK && !This->stop_playback);
CoUninitialize();
EnterCriticalSection(This->pin.pCritSec);