RESOLVED FIXED Bug 224237
[GStreamer] At EOS, change position to match duration, not the other way around.
https://bugs.webkit.org/show_bug.cgi?id=224237
Summary [GStreamer] At EOS, change position to match duration, not the other way around.
Alicia Boya García
Reported 2021-04-06 08:12:26 PDT
The criteria used to check if playback has finished is currentTime >= duration. Currently MediaPlayerPrivateGStreamer::didEnd() ensures this in an awkward way: by changing the duration so that it matches currentTime, rather than the other way around. This meant a duration change at the end of playback most of the time, with a slightly different duration each time, since currentTime is cached periodically. This patch reworks that function to work more naturally and less racy: First, only if the stream doesn't have a set duration (e.g. live stream), we set a duration to currentTime, as defined in the spec. Second, at EOS we update currentTime to match duration, rather than the other way around. This patch doesn't introduce changes in test results.
Attachments
Patch (3.98 KB, patch)
2021-04-06 08:17 PDT, Alicia Boya García
no flags
Alicia Boya García
Comment 1 2021-04-06 08:17:19 PDT
EWS
Comment 2 2021-04-06 10:10:32 PDT
Committed r275528: <https://commits.webkit.org/r275528> All reviewed patches have been landed. Closing bug and clearing flags on attachment 425280 [details].
Note You need to log in before you can comment on or make changes to this bug.