quartz: Do not report a position unless the filter graph is running or has been paused.

This commit is contained in:
Aric Stewart 2012-02-03 14:24:06 -06:00 committed by Alexandre Julliard
parent d1f6a5a376
commit 10b2a21c3b

View File

@ -2457,12 +2457,14 @@ static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONG
hr = all_renderers_seek(This, FoundCurrentPosition, (DWORD_PTR)pCurrent);
if (hr == E_NOTIMPL) {
LONGLONG time = 0;
if (This->refClock)
if (This->state == State_Running && This->refClock && This->start_time >= 0)
{
IReferenceClock_GetTime(This->refClock, &time);
if (time)
time -= This->start_time;
}
if (This->pause_time > 0)
time += This->pause_time;
*pCurrent = time;
hr = S_OK;
}