Commit cbb0ff37 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

quartz: Fix discontinuities in wave parser.

parent 3d8f5c15
...@@ -167,10 +167,8 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample) ...@@ -167,10 +167,8 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample)
{ {
REFERENCE_TIME tAviStart, tAviStop, tOffset; REFERENCE_TIME tAviStart, tAviStop, tOffset;
/* FIXME: hack */ IMediaSample_SetDiscontinuity(This->pCurrentSample, pOutputPin->dwSamplesProcessed == 0);
if (pOutputPin->dwSamplesProcessed == 0) {
IMediaSample_SetDiscontinuity(This->pCurrentSample, TRUE);
}
IMediaSample_SetSyncPoint(This->pCurrentSample, TRUE); IMediaSample_SetSyncPoint(This->pCurrentSample, TRUE);
pOutputPin->dwSamplesProcessed++; pOutputPin->dwSamplesProcessed++;
...@@ -195,8 +193,7 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample) ...@@ -195,8 +193,7 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample)
if (hr == S_FALSE) if (hr == S_FALSE)
{ {
/* Break out */ /* Break out */
offset_src += chunk_remaining_bytes; This->Parser.pInputPin->rtCurrent -= MEDIATIME_FROM_BYTES(cbSrcStream - offset_src - chunk_remaining_bytes);
This->Parser.pInputPin->rtCurrent -= BYTES_FROM_MEDIATIME(cbSrcStream - offset_src);
hr = S_OK; hr = S_OK;
break; break;
} }
...@@ -297,6 +294,7 @@ static HRESULT WAVEParserImpl_seek(IBaseFilter *iface) ...@@ -297,6 +294,7 @@ static HRESULT WAVEParserImpl_seek(IBaseFilter *iface)
} }
pPin->rtStart = pPin->rtCurrent = bytepos; pPin->rtStart = pPin->rtCurrent = bytepos;
((Parser_OutputPin *)This->Parser.ppPins[1])->dwSamplesProcessed = 0;
LeaveCriticalSection(&This->Parser.csFilter); LeaveCriticalSection(&This->Parser.csFilter);
TRACE("Done flushing\n"); TRACE("Done flushing\n");
......
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