From fa98b9e6d56bbe5ce164bf1b841acc82e1d92837 Mon Sep 17 00:00:00 2001 From: Karl Tomlinson Date: Thu, 12 Jun 2014 16:44:56 +1200 Subject: [PATCH] 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 --- content/media/MediaDecoderStateMachine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/media/MediaDecoderStateMachine.cpp b/content/media/MediaDecoderStateMachine.cpp index 8d02ef6c025..d25da0a8dc1 100644 --- a/content/media/MediaDecoderStateMachine.cpp +++ b/content/media/MediaDecoderStateMachine.cpp @@ -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) {