Skip to content
Snippets Groups Projects
Commit b22dd553 authored by Elizabeth Figura's avatar Elizabeth Figura Committed by Alexandre Julliard
Browse files

quartz/dsoundrender: Play non-discontinuous samples consecutively.

Ignoring their start time. This matches native behaviour.
parent c2cc20f7
No related branches found
No related tags found
No related merge requests found
......@@ -321,9 +321,9 @@ static HRESULT configure_buffer(struct dsound_render *filter, IMediaSample *pSam
static HRESULT render_sample(struct dsound_render *filter, IMediaSample *pSample)
{
REFERENCE_TIME start = -1, stop = -1;
LPBYTE pbSrcStream = NULL;
LONG cbSrcStream = 0;
REFERENCE_TIME tStart, tStop;
HRESULT hr;
hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
......@@ -333,11 +333,11 @@ static HRESULT render_sample(struct dsound_render *filter, IMediaSample *pSample
return hr;
}
hr = IMediaSample_GetTime(pSample, &tStart, &tStop);
if (FAILED(hr))
if (IMediaSample_IsDiscontinuity(pSample) == S_OK
&& FAILED(hr = IMediaSample_GetTime(pSample, &start, &stop)))
{
ERR("Failed to get sample time, hr %#lx.\n", hr);
tStart = tStop = -1;
start = stop = -1;
}
if (IMediaSample_IsPreroll(pSample) == S_OK)
......@@ -347,7 +347,7 @@ static HRESULT render_sample(struct dsound_render *filter, IMediaSample *pSample
}
cbSrcStream = IMediaSample_GetActualDataLength(pSample);
return send_sample_data(filter, tStart, pbSrcStream, cbSrcStream);
return send_sample_data(filter, start, pbSrcStream, cbSrcStream);
}
static HRESULT WINAPI dsound_render_sink_Receive(struct strmbase_sink *iface, IMediaSample *sample)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment