Commit bbdb6584 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

quartz: Fix a race in IMediaFilter::Pause().

Before finishing async run, graph->stream_start isn't stable. This will cause graph->current_pos to be out of playback duration. Since graph->current_pos is out of the range, the playback will be stopped. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52200Signed-off-by: 's avatarAkihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent b650e768
......@@ -5044,7 +5044,7 @@ static HRESULT WINAPI MediaFilter_Pause(IMediaFilter *iface)
if (graph->defaultclock && !graph->refClock)
IFilterGraph2_SetDefaultSyncSource(&graph->IFilterGraph2_iface);
if (graph->state == State_Running && graph->refClock)
if (graph->state == State_Running && !graph->needs_async_run && graph->refClock)
{
REFERENCE_TIME time;
IReferenceClock_GetTime(graph->refClock, &time);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment