Bug 1143575. Don't report negative frame delays. r=cpearce
This commit is contained in:
@@ -174,7 +174,11 @@ double HTMLVideoElement::MozFrameDelay()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Should be on main thread.");
|
||||
VideoFrameContainer* container = GetVideoFrameContainer();
|
||||
return container ? container->GetFrameDelay() : 0;
|
||||
// Hide negative delays. Frame timing tweaks in the compositor (e.g.
|
||||
// adding a bias value to prevent multiple dropped/duped frames when
|
||||
// frame times are aligned with composition times) may produce apparent
|
||||
// negative delay, but we shouldn't report that.
|
||||
return container ? std::max(0.0, container->GetFrameDelay()) : 0.0;
|
||||
}
|
||||
|
||||
bool HTMLVideoElement::MozHasAudio() const
|
||||
|
||||
Reference in New Issue
Block a user