b=1023697 use MediaStream to convert ticks to time in MediaDecoderStateMachine r=roc

--HG--
extra : transplant_source : %EA%E0%A5rH%F6%F55%B0%28%3Eq%5C%8Ap%FC%06%3D%06%3B
This commit is contained in:
Karl Tomlinson 2014-06-12 16:44:56 +12:00
parent d4faed6b58
commit 157b4b4902

View File

@ -426,7 +426,8 @@ void MediaDecoderStateMachine::SendStreamData()
}
minLastAudioPacketTime = std::min(minLastAudioPacketTime, stream->mLastAudioPacketTime);
endPosition = std::max(endPosition,
TicksToTimeRoundDown(mInfo.mAudio.mRate, stream->mAudioFramesWritten));
mediaStream->TicksToTimeRoundDown(mInfo.mAudio.mRate,
stream->mAudioFramesWritten));
}
if (mInfo.HasVideo()) {
@ -469,7 +470,7 @@ void MediaDecoderStateMachine::SendStreamData()
stream->mHaveSentFinishVideo = true;
}
endPosition = std::max(endPosition,
TicksToTimeRoundDown(RATE_VIDEO, stream->mNextVideoTime - stream->mInitialTime));
mediaStream->TicksToTimeRoundDown(RATE_VIDEO, stream->mNextVideoTime - stream->mInitialTime));
}
if (!stream->mHaveSentFinish) {