Bug 1113600 - Part 2. Handle setting a MediaStream sync point mid-playback. r=roc

This commit is contained in:
Andreas Pehrson 2015-01-08 13:37:22 +08:00
parent a5b7750c02
commit a22a198c37

View File

@ -1189,7 +1189,13 @@ void MediaDecoderStateMachine::SetSyncPointForMediaStream()
} }
mSyncPointInMediaStream = stream->GetLastOutputTime(); mSyncPointInMediaStream = stream->GetLastOutputTime();
mSyncPointInDecodedStream = mStartTime + mPlayDuration; TimeDuration timeSincePlayStart = mPlayStartTime.IsNull() ? TimeDuration(0) :
TimeStamp::Now() - mPlayStartTime;
mSyncPointInDecodedStream = mStartTime + mPlayDuration +
timeSincePlayStart.ToMicroseconds();
DECODER_LOG("SetSyncPointForMediaStream MediaStream=%lldus, DecodedStream=%lldus",
mSyncPointInMediaStream, mSyncPointInDecodedStream);
} }
void MediaDecoderStateMachine::ResyncMediaStreamClock() void MediaDecoderStateMachine::ResyncMediaStreamClock()