| Summary: | REGRESSION(262173@main): media/media-source/media-source-fastseek.html is a flaky text failure | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ben Schwartz <ben_schwartz> |
| Component: | Media | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | jean-yves.avenard, webkit-bot-watchers-bugzilla, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=259699 https://bugs.webkit.org/show_bug.cgi?id=250844 https://bugs.webkit.org/show_bug.cgi?id=260607 https://bugs.webkit.org/show_bug.cgi?id=260742 https://bugs.webkit.org/show_bug.cgi?id=260833 https://bugs.webkit.org/show_bug.cgi?id=260867 |
||
|
Description
Ben Schwartz
2023-08-14 17:26:02 PDT
I have marked this test as a flaky failure while the issue is being investigated. (PR link: https://github.com/WebKit/WebKit/pull/16693) Test gardening commit 266889@main (9544bcf5ae90): <https://commits.webkit.org/266889@main> Reviewed commits have been landed. Closing PR #16693 and removing active labels. I can see what the problem is: we assume that we have completed the seek when we have a signal that the time changed and that the player is not seeking. However, as soon as the RemoteMediaPlayer receives a timechange call, it assumes seeking has completed. That is not always the case: like if the GPU Process sent timechange just before we started seeking. fastSeek with MediaSource is broken as it is. When performing an accurate seek, the flow is to call MediaSourcePrivate::waitForSeekCompleted() , seek and then MediaSourcePrivate::seekCompleted(). between the two `waitForSeekCompleted` and `seekCompleted` `MediaPlayerPrivate::seeking` will return false. However, when doing a fast seek, we never call `MediaSourcePrivate::waitForSeekCompleted()` so `MediaPlayerPrivate::seeking` will return a stale value, which is typically the state of the previous seek and so typically `false` In this particular test, when we perform a `fastSeek` , if the GPU Process sent an earlier `timeChanged` as `MediaPlayerPrivate::seeking` will return `false` and so we fire `seeked` event even before the GPU Process has completed the seek operation and had time to update the currentTime to the actual value. I also note that in `void HTMLMediaElement::mediaPlayerTimeChanged()` we immediately call `updateActiveTextTrackCues(currentMediaTime());` but at this stage, currentMediaTime() returns the value of currentTime prior the seek operation. And as such it will set the TrackCues to the wrong time. It's actually a very similar failure to bug 250844. But while bug 250844 fixed it in just AVFObjC implementation, we can adopt a more global solution by making the entire seek operation an asynchronous operation with completion handlers. Pull request: https://github.com/WebKit/WebKit/pull/16974 Committed 267279@main (ee5de7a0c1f2): <https://commits.webkit.org/267279@main> Reviewed commits have been landed. Closing PR #16974 and removing active labels. |