RESOLVED FIXED302160
[MSE][GStreamer] Early reset m_isEndReached (EOS) when about to seek
https://bugs.webkit.org/show_bug.cgi?id=302160
Summary [MSE][GStreamer] Early reset m_isEndReached (EOS) when about to seek
Enrique Ocaña
Reported 2025-11-07 08:54:20 PST
When a video has reached End Of Stream and a (backwards) seek is done, the media player won't ever complete the seek in some cases because the EOS condition is still in place and no buffers are ever going to be pushed. A Successful seek completion would reset the EOS condition, but that won't happen since the seek won't even start. See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/1568 Unfortunately, this problem can be only reproduced downstream, so any patch submitted will only work there and having it upstream will only be a preventive measure for upgrades to future versions.
Attachments
Test case that triggers the original problem downstream (5.21 MB, application/x-compressed-tar)
2025-11-14 02:16 PST, Enrique Ocaña
no flags
Annotated filtered log of the test case (58.36 KB, text/plain)
2025-11-14 02:23 PST, Enrique Ocaña
no flags
Enrique Ocaña
Comment 1 2025-11-07 09:00:01 PST
Enrique Ocaña
Comment 2 2025-11-14 02:16:10 PST
Created attachment 477391 [details] Test case that triggers the original problem downstream This test case is a modification of the one provided in https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/1568, with some more extra console.log() to help undertand better the different steps exercised.
Enrique Ocaña
Comment 3 2025-11-14 02:23:00 PST
Created attachment 477392 [details] Annotated filtered log of the test case Annotated filtered log of the provided test case, ran on a Raspberry Pi 3 using downstream debug branch https://github.com/WebPlatformForEmbedded/WPEWebKit/commits/eocanha/eocanha-debug-158/ , based on wpe-2.48 plus a bunch of extra log lines and the m_isEndReached reset fix commented out to trigger the error again on purpose. This file has ANSI color codes. View it by using `cat` on a terminal emulator. This file shows how m_isEndReached being true triggers a series of events that end up on both HTMLMediaElement and MediaPlayerPrivateGStreamer/MediaPlayerPrivateGStreamerMSE paused and without any intention to play again after a seek. The proposed patch would have reset m_isEndReached after a seek to a position lower than the duration. This would have prevented the series of events happening and the video would have properly played after the seek.
EWS
Comment 4 2025-11-18 09:30:29 PST
Committed 303186@main (4b36b57f5261): <https://commits.webkit.org/303186@main> Reviewed commits have been landed. Closing PR #53592 and removing active labels.
Radar WebKit Bug Importer
Comment 5 2025-11-18 09:31:13 PST
Note You need to log in before you can comment on or make changes to this bug.