diff --git a/dom/media/encoder/VP8TrackEncoder.cpp b/dom/media/encoder/VP8TrackEncoder.cpp index 84a98c878006..6342f803ebef 100644 --- a/dom/media/encoder/VP8TrackEncoder.cpp +++ b/dom/media/encoder/VP8TrackEncoder.cpp @@ -551,6 +551,10 @@ nsresult VP8TrackEncoder::Encode(VideoSegment* aSegment) { MOZ_DIAGNOSTIC_ASSERT(encodedFrame); + if (mKeyFrameInterval > TimeDuration::FromSeconds(0)) { + mDurationSinceLastKeyframe += chunk.GetDuration(); + } + // Move forward the mEncodedTimestamp. mEncodedTimestamp += chunk.GetDuration();