quartz: Do timekeeping in the avi decoder.
Fixes the timestamps generated.
This commit is contained in:
parent
6d7518685e
commit
c4e32aad01
@ -78,6 +78,7 @@ static HRESULT AVIDec_ProcessSampleData(TransformFilterImpl* pTransformFilter, I
|
|||||||
LPBYTE pbDstStream;
|
LPBYTE pbDstStream;
|
||||||
DWORD cbSrcStream;
|
DWORD cbSrcStream;
|
||||||
LPBYTE pbSrcStream;
|
LPBYTE pbSrcStream;
|
||||||
|
LONGLONG tStart, tStop;
|
||||||
|
|
||||||
hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
|
hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
@ -124,6 +125,16 @@ static HRESULT AVIDec_ProcessSampleData(TransformFilterImpl* pTransformFilter, I
|
|||||||
if (res != ICERR_OK)
|
if (res != ICERR_OK)
|
||||||
ERR("Error occurred during the decompression (%x)\n", res);
|
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);
|
hr = OutputPin_SendSample((OutputPin*)This->tf.ppPins[1], pOutSample);
|
||||||
if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) {
|
if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) {
|
||||||
ERR("Error sending sample (%x)\n", hr);
|
ERR("Error sending sample (%x)\n", hr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user