quartz: Do not report a position unless the filter graph is running or has been paused.
This commit is contained in:
parent
d1f6a5a376
commit
10b2a21c3b
@ -2457,12 +2457,14 @@ static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONG
|
|||||||
hr = all_renderers_seek(This, FoundCurrentPosition, (DWORD_PTR)pCurrent);
|
hr = all_renderers_seek(This, FoundCurrentPosition, (DWORD_PTR)pCurrent);
|
||||||
if (hr == E_NOTIMPL) {
|
if (hr == E_NOTIMPL) {
|
||||||
LONGLONG time = 0;
|
LONGLONG time = 0;
|
||||||
if (This->refClock)
|
if (This->state == State_Running && This->refClock && This->start_time >= 0)
|
||||||
{
|
{
|
||||||
IReferenceClock_GetTime(This->refClock, &time);
|
IReferenceClock_GetTime(This->refClock, &time);
|
||||||
if (time)
|
if (time)
|
||||||
time -= This->start_time;
|
time -= This->start_time;
|
||||||
}
|
}
|
||||||
|
if (This->pause_time > 0)
|
||||||
|
time += This->pause_time;
|
||||||
*pCurrent = time;
|
*pCurrent = time;
|
||||||
hr = S_OK;
|
hr = S_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user