mirror of
https://github.com/reactos/wine.git
synced 2025-02-22 05:40:50 +00:00
quartz: Do timekeeping in the avi decoder.
Fixes the timestamps generated.
This commit is contained in:
parent
6d7518685e
commit
c4e32aad01
@ -78,12 +78,13 @@ static HRESULT AVIDec_ProcessSampleData(TransformFilterImpl* pTransformFilter, I
|
||||
LPBYTE pbDstStream;
|
||||
DWORD cbSrcStream;
|
||||
LPBYTE pbSrcStream;
|
||||
LONGLONG tStart, tStop;
|
||||
|
||||
hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
ERR("Cannot get pointer to sample data (%x)\n", hr);
|
||||
return hr;
|
||||
return hr;
|
||||
}
|
||||
|
||||
cbSrcStream = IMediaSample_GetActualDataLength(pSample);
|
||||
@ -92,8 +93,8 @@ static HRESULT AVIDec_ProcessSampleData(TransformFilterImpl* pTransformFilter, I
|
||||
|
||||
hr = IPin_ConnectionMediaType(This->tf.ppPins[0], &amt);
|
||||
if (FAILED(hr)) {
|
||||
ERR("Unable to retrieve media type\n");
|
||||
goto error;
|
||||
ERR("Unable to retrieve media type\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Update input size to match sample size */
|
||||
@ -124,6 +125,16 @@ static HRESULT AVIDec_ProcessSampleData(TransformFilterImpl* pTransformFilter, I
|
||||
if (res != ICERR_OK)
|
||||
ERR("Error occurred during the decompression (%x)\n", res);
|
||||
|
||||
|
||||
IMediaSample_SetPreroll(pOutSample, (IMediaSample_IsPreroll(pSample) == S_OK));
|
||||
IMediaSample_SetDiscontinuity(pOutSample, (IMediaSample_IsDiscontinuity(pSample) == S_OK));
|
||||
IMediaSample_SetSyncPoint(pOutSample, (IMediaSample_IsSyncPoint(pSample) == S_OK));
|
||||
|
||||
if (IMediaSample_GetTime(pSample, &tStart, &tStop) == S_OK)
|
||||
IMediaSample_SetTime(pOutSample, &tStart, &tStop);
|
||||
else
|
||||
IMediaSample_SetTime(pOutSample, NULL, NULL);
|
||||
|
||||
hr = OutputPin_SendSample((OutputPin*)This->tf.ppPins[1], pOutSample);
|
||||
if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) {
|
||||
ERR("Error sending sample (%x)\n", hr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user