From 3ae5e291b714a77c7b20c2e469fad08866cc9cc1 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Wed, 16 Apr 2008 14:26:15 -0700 Subject: [PATCH] quartz: Make sure at least 1 sample is processed when starting to process in pullpin One sample should be sent while pausing, this is the only way to make sure --- dlls/quartz/pin.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index 71f33ec..0c333f7 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -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); -- 1.5.4.1