Revert "Bug 1112438 - Make newCurrentFrameTime more accurate while seeking by checking audio & video timestamp boundary in addition. r=cpearce" r=cpearce

This reverts commit 4b812ca9

The original commit was a work around for poorly encoded videos generated by some FFOS devices which could make the first audio frame non-zero. Trying then to make them appear as zero when seeking to start.

There are better ways to get around this problem.
This commit is contained in:
Jean-Yves Avenard 2016-01-28 15:48:06 +11:00
Родитель ac9a8bf77c
Коммит 49b4401684
1 изменённых файлов: 1 добавлений и 9 удалений

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

@ -2089,15 +2089,7 @@ MediaDecoderStateMachine::SeekCompleted()
newCurrentTime = seekTime;
} else if (HasAudio()) {
MediaData* audio = AudioQueue().PeekFront();
// Though we adjust the newCurrentTime in audio-based, and supplemented
// by video. For better UX, should NOT bind the slide position to
// the first audio data timestamp directly.
// While seeking to a position where there's only either audio or video, or
// seeking to a position lies before audio or video, we need to check if
// seekTime is bounded in suitable duration. See Bug 1112438.
int64_t videoStart = video ? video->mTime : seekTime;
int64_t audioStart = audio ? audio->mTime : seekTime;
newCurrentTime = std::min(audioStart, videoStart);
newCurrentTime = audio ? audio->mTime : seekTime;
} else {
newCurrentTime = video ? video->mTime : seekTime;
}