Bug 1008785 - Ensure the last video frame end time is correct on Android MP4 playback. r=kinetik

This commit is contained in:
Chris Pearce 2014-05-12 14:35:46 +12:00
parent 4b6d3a8f6d
commit 9037e1639f

View File

@ -144,9 +144,7 @@ bool MediaPluginReader::DecodeVideoFrame(bool &aKeyframeSkip,
if (mLastVideoFrame) {
int64_t durationUs;
mPlugin->GetDuration(mPlugin, &durationUs);
if (durationUs < mLastVideoFrame->mTime) {
durationUs = 0;
}
durationUs = std::max<int64_t>(durationUs - mLastVideoFrame->mTime, 0);
mVideoQueue.Push(VideoData::ShallowCopyUpdateDuration(mLastVideoFrame,
durationUs));
mLastVideoFrame = nullptr;