Bug 1064699 - Update mLastVideoFrameTime after it's used for computing the frame duration. r=cajbir

This commit is contained in:
Matthew Gregan 2014-09-08 23:20:00 +12:00
parent 7f06f725b5
commit 58f9ec31b0

View File

@ -865,7 +865,6 @@ bool WebMReader::DecodeVideoFrame(bool &aKeyframeSkip,
if (r == -1) {
return false;
}
mLastVideoFrameTime = tstamp;
// The end time of this frame is the start time of the next frame. Fetch
// the timestamp of the next packet for this track. If we've reached the
@ -883,6 +882,7 @@ bool WebMReader::DecodeVideoFrame(bool &aKeyframeSkip,
next_tstamp = tstamp;
next_tstamp += tstamp - mLastVideoFrameTime;
}
mLastVideoFrameTime = tstamp;
int64_t tstamp_usecs = tstamp / NS_PER_USEC;
for (uint32_t i = 0; i < count; ++i) {