Bug 1808680 - In VP8TrackEncoder account for skipped frames when deciding whether to force a keyframe. r=padenot

Differential Revision: https://phabricator.services.mozilla.com/D171540
This commit is contained in:
Andreas Pehrson 2023-03-07 09:28:11 +00:00
parent 9fdcb33593
commit 2ec7a23534

View File

@ -551,6 +551,10 @@ nsresult VP8TrackEncoder::Encode(VideoSegment* aSegment) {
MOZ_DIAGNOSTIC_ASSERT(encodedFrame); MOZ_DIAGNOSTIC_ASSERT(encodedFrame);
if (mKeyFrameInterval > TimeDuration::FromSeconds(0)) {
mDurationSinceLastKeyframe += chunk.GetDuration();
}
// Move forward the mEncodedTimestamp. // Move forward the mEncodedTimestamp.
mEncodedTimestamp += chunk.GetDuration(); mEncodedTimestamp += chunk.GetDuration();