Bug 283275
| Summary: | Playback doesn't always resume after a seek | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Component: | New Bugs | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Jean-Yves Avenard [:jya]
When playing both a video through MediaSource or a WebM, when you quickly seek back and forth in the video which is currently playing. About 1 in 3 times playback will not resume.
STR:
- Start playing a MSE video or a WeBM video such as https://jyavenard.github.io/htmltests/mediatest/webm/Morocco_1080p30.webm
- Seek sometimes in the future.
- If video resumes, seek sometimes in the past
Repeat until after seeking playback stays pause.
It usually never takes more than 5 goes.
This happens because we seek to a MediaTime which is a backed by a double and we wait for the time synchroniser to complete its own seek. The synchroniser uses a rational number.
In the log sometimes I could see:
MediaPlayerPrivateWebM::operator()(E1CBD29A9CAC648C) seekedTime = {"value":201.04438000000002}, synchronizerTime = {"value":201.04438,"numerator":2010443800,"denominator":10000000,"flags":1}synchronizer seeking = true
So even though we have synchronizerTime almost equal to seekedTime, the float rounding errors causes the test to determine if we've completed the seek to fail
`m_isSynchronizerSeeking = synchronizerTime != seekedTime;` [1]
The same occurs playing this video over MSE [2]
[1] https://searchfox.org/wubkat/rev/d45649fa32a499702c30474e94bd6843c4c67849/Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm#437https://searchfox.org/wubkat/rev/d45649fa32a499702c30474e94bd6843c4c67849/Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm#437
[2] https://searchfox.org/wubkat/rev/d45649fa32a499702c30474e94bd6843c4c67849/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm#562
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/140097993>
Jean-Yves Avenard [:jya]
Committed 286685@main (20984f6): https://commits.webkit.org/286685@main
Reviewed commits have been landed. Closing PR #36676 and removing active labels.
Jean-Yves Avenard [:jya]
modified the wrong bug
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/36782
EWS
Committed 286956@main (4a58bf5dbacc): <https://commits.webkit.org/286956@main>
Reviewed commits have been landed. Closing PR #36782 and removing active labels.