Bug 1253928 - adjust the time passed to RequestVideoData() by the start time to avoid incorrectly skipping key frames. r=jya.

MozReview-Commit-ID: 9NHapIMoozG
This commit is contained in:
JW Wang 2016-03-07 18:44:03 +08:00
Родитель 09155c88a8
Коммит d5a8e21b53
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -1757,7 +1757,10 @@ MediaDecoderStateMachine::RequestVideoData()
bool skipToNextKeyFrame = mSentFirstFrameLoadedEvent &&
NeedToSkipToNextKeyframe();
int64_t currentTime = mState == DECODER_STATE_SEEKING ? 0 : GetMediaTime();
int64_t currentTime =
mState == DECODER_STATE_SEEKING || !mSentFirstFrameLoadedEvent
? 0 : GetMediaTime() + StartTime();
SAMPLE_LOG("Queueing video task - queued=%i, decoder-queued=%o, skip=%i, time=%lld",
VideoQueue().GetSize(), mReader->SizeOfVideoQueueInFrames(), skipToNextKeyFrame,