quartz: If the MediaSeeking is not implemented all the way up the passthru chain fall back to the filtergraph's clock to find position.

This commit is contained in:
Aric Stewart 2012-01-31 13:52:27 -06:00 committed by Alexandre Julliard
parent a8a2f87135
commit 53bd62737c
1 changed files with 8 additions and 1 deletions

View File

@ -2456,7 +2456,14 @@ static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONG
*pCurrent = -1;
hr = all_renderers_seek(This, FoundCurrentPosition, (DWORD_PTR)pCurrent);
if (hr == E_NOTIMPL) {
*pCurrent = 0;
LONGLONG time = 0;
if (This->refClock)
{
IReferenceClock_GetTime(This->refClock, &time);
if (time)
time -= This->start_time;
}
*pCurrent = time;
hr = S_OK;
}
LeaveCriticalSection(&This->cs);