Commit d99912aa authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Record jitter before waiting for presentation time.

Otherwise we will consistently report that samples are late. In practice this can end up causing GStreamer to drop many video samples, which is one of the apparent causes of bug 50733. At the same time, don't record jitter *before* signalling preroll, as in that case stream_start will not yet be valid, and we'll end up recording something near the current tick count, and in this way also incorrectly report that samples are late. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 1564d658
......@@ -378,14 +378,9 @@ static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSamp
strmbase_passthrough_update_time(&filter->passthrough, start);
need_wait = TRUE;
}
else
start = stop = -1;
if (state == State_Paused)
{
begin_render(filter, start, stop);
hr = filter->pFuncsTable->pfnDoRenderSample(filter, sample);
}
if (need_wait)
{
......@@ -394,6 +389,8 @@ static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSamp
IReferenceClock_GetTime(filter->filter.clock, &now);
begin_render(filter, start, stop);
if (now - filter->stream_start - start <= -10000)
{
HANDLE handles[2] = {filter->advise_event, filter->flush_event};
......@@ -411,16 +408,18 @@ static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSamp
return S_OK;
}
}
}
if (state == State_Running)
if (state == State_Running)
hr = filter->pFuncsTable->pfnDoRenderSample(filter, sample);
perform_qos(filter);
}
else
{
begin_render(filter, start, stop);
hr = filter->pFuncsTable->pfnDoRenderSample(filter, sample);
if (state == State_Running)
hr = filter->pFuncsTable->pfnDoRenderSample(filter, sample);
}
perform_qos(filter);
return hr;
}
......
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