Closed Bug 1729420 Opened 3 years ago Closed 3 years ago

video frames are displayed unordered when updated the video.currentTime directly

Categories

(Core :: Audio/Video: Playback, defect, P2)

Firefox 91
defect

Tracking

()

VERIFIED FIXED
94 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 94+ verified
firefox92 --- wontfix
firefox93 + verified
firefox94 --- verified

People

(Reporter: shacababy, Assigned: alwu)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36

Steps to reproduce:

to reproduce:
https://codesandbox.io/s/zealous-grass-y7b2b?file=/index.html

click the play buttom

Actual results:

when setting the video.currentTime to play the video, the video played back and forth. (unordered)
It happens when the video is 10fps and the currentTime equals the key frame time. (0.1s interval)

Expected results:

play the video in order.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

Thanks for the bug report and the test case!

This appears to be a regression from bug 1718709 (as verified via mozregression). Alastor, would you be able to take a look at this when you have time? Please adjust severity and priority as you see fit.

Severity: -- → S2
Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Ever confirmed: true
Flags: needinfo?(alwu)
Priority: -- → P2
Regressed by: 1718709

I can reproduce this issue as well, will update more information after I figure out what happens.

Assignee: nobody → alwu
Flags: needinfo?(alwu)
Attachment #9239950 - Attachment description: Bug 1729420 - compare the output to the inputs in order to determine if it's an invalid first sample or not. → Bug 1729420 - part1 : compare the output to the inputs in order to determine if it's an invalid first sample or not.

Depends on D124858

Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/30a53fd882ef
part1 : compare the output to the inputs in order to determine if it's an invalid first sample or not. r=bryce
https://hg.mozilla.org/integration/autoland/rev/b0a5b9acbbe1
part2 : add a ref-test to check frame order. r=bryce
https://hg.mozilla.org/integration/autoland/rev/00789f397362
part3 : make generateREF.html easier to be used and fix the cross-origin error during capturing the video frame. r=bryce

Comment on attachment 9239950 [details]
Bug 1729420 - part1 : compare the output to the inputs in order to determine if it's an invalid first sample or not.

Beta/Release Uplift Approval Request

  • User impact if declined: Under some situations, user might see video being rendered out-of-order.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See comment0.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): These patches improve the mechanism of discarding the first invalid frame on Windows, and ensure that it won't affect other non-first frames which causes discarding correct frames (this bug). These changes also come with the automation test and passed the other automation tests that we added before for the similar issue.
  • String changes made/needed: No
Attachment #9239950 - Flags: approval-mozilla-beta?
Attachment #9239989 - Flags: approval-mozilla-beta?
Attachment #9240102 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Comment on attachment 9239950 [details]
Bug 1729420 - part1 : compare the output to the inputs in order to determine if it's an invalid first sample or not.

P2/S2, has tests and is evaluated to low risk, approved for 93 beta 6, thanks.

Attachment #9239950 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9239989 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9240102 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I've reproduced this bug using the steps from comment 0, on an affected Nightly build (2021-09-07).

The fix is verified on latest Nightly 94 and Beta 93.0b6, across platforms: Win 10 x64, macOS 11 and Ubuntu 18.04 x64.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

Comment on attachment 9239950 [details]
Bug 1729420 - part1 : compare the output to the inputs in order to determine if it's an invalid first sample or not.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: These patches handle the case where (1) video playback might be handing for 1+ second during seeking (1721458) (2) video frames might be displayed in an incorrect order (skip some frames)
  • User impact if declined: As above, there are two possible bugs.
  • Fix Landed on Version: 93
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): These patches implement a better approach to filter out the invalid first video frame on Windows, which aims to solve the issue where we incorrectly discard more frames than we want, and causes video hang. We didn't introduce new feature or change the architecture in these patches, no any huge change gets introduced.In addition, we have automation test to cover this issue. Therefore, these changes are suppose to be low risk.
  • String or UUID changes made by this patch:
Attachment #9239950 - Flags: approval-mozilla-esr91?
Attachment #9239989 - Flags: approval-mozilla-esr91?
Attachment #9240102 - Flags: approval-mozilla-esr91?

The patches do not apply to the esr91 branch as they are on top of bug 1721458, should we also uplift bug 1721458?

Flags: needinfo?(alwu)

Let's track this uplift request for 91.3esr next cycle.

Yes, thank you. Should I file another approval? The reason I didn't mention that bug is because the the fix of bug 1721458 will be removed in this bug.

Flags: needinfo?(alwu) → needinfo?(pascalc)

(In reply to Alastor Wu [:alwu] from comment #17)

Yes, thank you. Should I file another approval? The reason I didn't mention that bug is because the the fix of bug 1721458 will be removed in this bug.

Yes please, and reference this bug in the uplift request, thanks.

Flags: needinfo?(pascalc)

Comment on attachment 9239950 [details]
Bug 1729420 - part1 : compare the output to the inputs in order to determine if it's an invalid first sample or not.

Approved for 91.3esr.

Attachment #9239950 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
Attachment #9239989 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
Attachment #9240102 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+

This is also verified as fixed on 91.3.0esr (2021-10-28).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: