quartz: Update start_time if the current position is changed.
This commit is contained in:
parent
3e9cee050f
commit
1281b74956
|
@ -2126,7 +2126,9 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface,
|
||||||
TRACE("State: %s\n", state == State_Running ? "Running" : (state == State_Paused ? "Paused" : (state == State_Stopped ? "Stopped" : "UNKNOWN")));
|
TRACE("State: %s\n", state == State_Running ? "Running" : (state == State_Paused ? "Paused" : (state == State_Stopped ? "Stopped" : "UNKNOWN")));
|
||||||
|
|
||||||
if ((dwCurrentFlags & 0x7) == AM_SEEKING_AbsolutePositioning)
|
if ((dwCurrentFlags & 0x7) == AM_SEEKING_AbsolutePositioning)
|
||||||
|
{
|
||||||
This->position = *pCurrent;
|
This->position = *pCurrent;
|
||||||
|
}
|
||||||
else if ((dwCurrentFlags & 0x7) != AM_SEEKING_NoPositioning)
|
else if ((dwCurrentFlags & 0x7) != AM_SEEKING_NoPositioning)
|
||||||
FIXME("Adjust method %x not handled yet!\n", dwCurrentFlags & 0x7);
|
FIXME("Adjust method %x not handled yet!\n", dwCurrentFlags & 0x7);
|
||||||
|
|
||||||
|
@ -2140,6 +2142,12 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface,
|
||||||
args.curflags = dwCurrentFlags;
|
args.curflags = dwCurrentFlags;
|
||||||
args.stopflags = dwStopFlags;
|
args.stopflags = dwStopFlags;
|
||||||
hr = all_renderers_seek(This, found_setposition, (DWORD_PTR)&args);
|
hr = all_renderers_seek(This, found_setposition, (DWORD_PTR)&args);
|
||||||
|
|
||||||
|
if (This->refClock && ((dwCurrentFlags & 0x7) != AM_SEEKING_NoPositioning))
|
||||||
|
{
|
||||||
|
/* Update start time, prevents weird jumps */
|
||||||
|
IReferenceClock_GetTime(This->refClock, &This->start_time);
|
||||||
|
}
|
||||||
LeaveCriticalSection(&This->cs);
|
LeaveCriticalSection(&This->cs);
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
|
Loading…
Reference in New Issue