Maarten Lankhorst : quartz: Update start_time if the current position is changed.

Alexandre Julliard julliard at winehq.org
Tue Apr 15 08:47:32 CDT 2008


Module: wine
Branch: master
Commit: 1281b74956d28c2814cb5c592121410ddd1b750c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1281b74956d28c2814cb5c592121410ddd1b750c

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Mon Apr 14 13:30:49 2008 -0700

quartz: Update start_time if the current position is changed.

---

 dlls/quartz/filtergraph.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 94e4003..ee31068 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -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")));
 
     if ((dwCurrentFlags & 0x7) == AM_SEEKING_AbsolutePositioning)
+    {
         This->position = *pCurrent;
+    }
     else if ((dwCurrentFlags & 0x7) != AM_SEEKING_NoPositioning)
         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.stopflags = dwStopFlags;
     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);
 
     return hr;




More information about the wine-cvs mailing list