Commit 2ea8f8a4 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

wineqtdecoder: Improve and differentiate Sample Time and MediaTime.

parent 3ef34d77
...@@ -467,6 +467,7 @@ static DWORD WINAPI QTSplitter_thread(LPVOID data) ...@@ -467,6 +467,7 @@ static DWORD WINAPI QTSplitter_thread(LPVOID data)
do do
{ {
LONGLONG tStart=0, tStop=0; LONGLONG tStart=0, tStop=0;
LONGLONG mStart=0, mStop=0;
float time; float time;
GetMovieNextInterestingTime(This->pQTMovie, nextTimeStep, 0, NULL, movie_time, 1, &next_time, NULL); GetMovieNextInterestingTime(This->pQTMovie, nextTimeStep, 0, NULL, movie_time, 1, &next_time, NULL);
...@@ -485,6 +486,9 @@ static DWORD WINAPI QTSplitter_thread(LPVOID data) ...@@ -485,6 +486,9 @@ static DWORD WINAPI QTSplitter_thread(LPVOID data)
TRACE("In loop at time %ld\n",movie_time); TRACE("In loop at time %ld\n",movie_time);
TRACE("In Next time %ld\n",next_time); TRACE("In Next time %ld\n",next_time);
mStart = movie_time;
mStop = next_time;
time = (float)movie_time / tr.scale; time = (float)movie_time / tr.scale;
tStart = time * 10000000; tStart = time * 10000000;
time = (float)next_time / tr.scale; time = (float)next_time / tr.scale;
...@@ -539,11 +543,8 @@ static DWORD WINAPI QTSplitter_thread(LPVOID data) ...@@ -539,11 +543,8 @@ static DWORD WINAPI QTSplitter_thread(LPVOID data)
IMediaSample_SetActualDataLength(sample, frames * pvi->nBlockAlign); IMediaSample_SetActualDataLength(sample, frames * pvi->nBlockAlign);
IMediaSample_SetMediaTime(sample, &tStart, &tStop); IMediaSample_SetMediaTime(sample, &mStart, &mStop);
if (tStart)
IMediaSample_SetTime(sample, &tStart, &tStop); IMediaSample_SetTime(sample, &tStart, &tStop);
else
IMediaSample_SetTime(sample, NULL, NULL);
hr = OutputQueue_Receive(This->pAudio_Pin->queue, sample); hr = OutputQueue_Receive(This->pAudio_Pin->queue, sample);
TRACE("Audio Delivered (%x)\n",hr); TRACE("Audio Delivered (%x)\n",hr);
...@@ -597,11 +598,8 @@ audio_error: ...@@ -597,11 +598,8 @@ audio_error:
IMediaSample_SetActualDataLength(sample, This->outputSize); IMediaSample_SetActualDataLength(sample, This->outputSize);
IMediaSample_SetMediaTime(sample, &tStart, &tStop); IMediaSample_SetMediaTime(sample, &mStart, &mStop);
if (tStart)
IMediaSample_SetTime(sample, &tStart, &tStop); IMediaSample_SetTime(sample, &tStart, &tStop);
else
IMediaSample_SetTime(sample, NULL, NULL);
hr = OutputQueue_Receive(This->pVideo_Pin->queue, sample); hr = OutputQueue_Receive(This->pVideo_Pin->queue, sample);
TRACE("Video Delivered (%x)\n",hr); TRACE("Video Delivered (%x)\n",hr);
......
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