wineqtdecoder: Improve and differentiate Sample Time and MediaTime.
This commit is contained in:
parent
3ef34d7799
commit
2ea8f8a4a0
|
@ -467,6 +467,7 @@ static DWORD WINAPI QTSplitter_thread(LPVOID data)
|
|||
do
|
||||
{
|
||||
LONGLONG tStart=0, tStop=0;
|
||||
LONGLONG mStart=0, mStop=0;
|
||||
float time;
|
||||
|
||||
GetMovieNextInterestingTime(This->pQTMovie, nextTimeStep, 0, NULL, movie_time, 1, &next_time, NULL);
|
||||
|
@ -485,6 +486,9 @@ static DWORD WINAPI QTSplitter_thread(LPVOID data)
|
|||
TRACE("In loop at time %ld\n",movie_time);
|
||||
TRACE("In Next time %ld\n",next_time);
|
||||
|
||||
mStart = movie_time;
|
||||
mStop = next_time;
|
||||
|
||||
time = (float)movie_time / tr.scale;
|
||||
tStart = time * 10000000;
|
||||
time = (float)next_time / tr.scale;
|
||||
|
@ -539,11 +543,8 @@ static DWORD WINAPI QTSplitter_thread(LPVOID data)
|
|||
|
||||
IMediaSample_SetActualDataLength(sample, frames * pvi->nBlockAlign);
|
||||
|
||||
IMediaSample_SetMediaTime(sample, &tStart, &tStop);
|
||||
if (tStart)
|
||||
IMediaSample_SetMediaTime(sample, &mStart, &mStop);
|
||||
IMediaSample_SetTime(sample, &tStart, &tStop);
|
||||
else
|
||||
IMediaSample_SetTime(sample, NULL, NULL);
|
||||
|
||||
hr = OutputQueue_Receive(This->pAudio_Pin->queue, sample);
|
||||
TRACE("Audio Delivered (%x)\n",hr);
|
||||
|
@ -597,11 +598,8 @@ audio_error:
|
|||
|
||||
IMediaSample_SetActualDataLength(sample, This->outputSize);
|
||||
|
||||
IMediaSample_SetMediaTime(sample, &tStart, &tStop);
|
||||
if (tStart)
|
||||
IMediaSample_SetMediaTime(sample, &mStart, &mStop);
|
||||
IMediaSample_SetTime(sample, &tStart, &tStop);
|
||||
else
|
||||
IMediaSample_SetTime(sample, NULL, NULL);
|
||||
|
||||
hr = OutputQueue_Receive(This->pVideo_Pin->queue, sample);
|
||||
TRACE("Video Delivered (%x)\n",hr);
|
||||
|
|
Loading…
Reference in New Issue