From b353f32453da4bfe6aaccbb9effef48e7ae679ff Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Fri, 10 Dec 2010 16:06:55 +0100 Subject: [PATCH] quartz: Handle seeking while running better. --- dlls/quartz/filtergraph.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 50a045ea454..05b6e47b4db 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2471,17 +2471,18 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, else if ((dwStopFlags & 0x7) != AM_SEEKING_NoPositioning) FIXME("Stop position not handled yet!\n"); + if (state == State_Running && !(dwCurrentFlags & AM_SEEKING_NoFlush)) + IMediaControl_Pause((IMediaControl*)&This->IMediaControl_vtbl); args.current = pCurrent; args.stop = pStop; args.curflags = dwCurrentFlags; args.stopflags = dwStopFlags; hr = all_renderers_seek(This, found_setposition, (DWORD_PTR)&args); - if ((dwCurrentFlags & 0x7) != AM_SEEKING_NoPositioning) { - if (This->state == State_Running) - FIXME("Seeking while graph is running is not properly supported!\n"); + if ((dwCurrentFlags & 0x7) != AM_SEEKING_NoPositioning) This->pause_time = This->start_time = -1; - } + if (state == State_Running && !(dwCurrentFlags & AM_SEEKING_NoFlush)) + IMediaControl_Run((IMediaControl*)&This->IMediaControl_vtbl); LeaveCriticalSection(&This->cs); return hr;