Bug 1069289 - take |mAudioEndTime| into account when updating playback position at the end of playback. r=kinetik

This commit is contained in:
JW Wang 2014-10-07 19:45:00 +02:00
Родитель 049052f05d
Коммит 83dc138454
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -2478,8 +2478,8 @@ nsresult MediaDecoderStateMachine::RunStateMachine()
// will take care of calling MediaDecoder::PlaybackEnded.
if (mDecoder->GetState() == MediaDecoder::PLAY_STATE_PLAYING &&
!mDecoder->GetDecodedStream()) {
int64_t videoTime = HasVideo() ? mVideoFrameEndTime : 0;
int64_t clockTime = std::max(mEndTime, videoTime);
int64_t clockTime = std::max(mAudioEndTime, mVideoFrameEndTime);
clockTime = std::max(int64_t(0), std::max(clockTime, mEndTime));
UpdatePlaybackPosition(clockTime);
{