Commit ee188e8
committed
[MSE][GStreamer] Prevent currentTime reset on preroll when audio sink is non-async
https://bugs.webkit.org/show_bug.cgi?id=269587
Reviewed by Xabier Rodriguez-Calvar.
When doing an initial seek (during preroll) on an MSE content that is
audio-only on platforms whose audio sink is not asynchronous (eg: on
Broadcom Nexus devices), the manually triggered preroll introduced by
https://commits.webkit.org/268845@main causes an invalidation of the
currentTime cached position. This causes a temporary currentTime 0 value
that creates a drop to HaveMetadata in the MediaSource readyState,
causing a number of problems.
See: #1211
This patch remembers seek position as a cached value on an initial seek
during preroll when the audio sink can't perform asynchronous state
changes.
Based on a patch by Jacek Skiba <jacek.skiba@consult.red>
* Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::doSeek): Cache the previous position (the seek position) before the manual preroll and then immediately propagate the readyState to the player and invalidate the cached position after the preroll, so the new position is the one resulting from the preroll to the seek target position.
Canonical link: https://commits.webkit.org/274971@main1 parent bb85314 commit ee188e8
1 file changed
Lines changed: 7 additions & 0 deletions
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
279 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
280 | 287 | | |
281 | 288 | | |
282 | 289 | | |
| |||
0 commit comments