Bug 211182

Summary: [GStreamer] Video loops when ran in rr record --chaos
Product: WebKit Reporter: Alicia Boya García <aboya>
Component: WebKitGTKAssignee: Alicia Boya García <aboya>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, calvaris, cgarcia, eric.carlson, ews-watchlist, glenn, gustavo, jer.noble, menard, philipj, pnormand, sergio, vjaquez
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Alicia Boya García 2020-04-29 07:24:47 PDT
While trying to investigate a different bug, I ran the browser with
`rr record --chaos`, which makes it run very slowly and shuffles
thread scheduling to try to make existing race conditions more likely
to show up, also inevitably making the software run very slow.

Doing so I found something strange: the video kept looping even though
it didn't have the `loop` attribute set.

After some debugging I found that MediaPlayer decides if the video has
ended in part by checking `currentMediaTime()` is greater or equal to
the video duration, which was not guaranteed to be the case in
MediaPlayerPrivateGStreamer.

As a consequence of this patch, one new LayoutTest has passed.
Comment 1 Alicia Boya García 2020-04-29 07:28:19 PDT
Created attachment 397960 [details]
Patch
Comment 2 Philippe Normand 2020-04-29 07:38:55 PDT
Looks similar to bug 191259
Comment 3 Philippe Normand 2020-05-05 02:11:21 PDT
*** Bug 191259 has been marked as a duplicate of this bug. ***
Comment 4 EWS 2020-05-05 07:36:54 PDT
Committed r261165: <https://trac.webkit.org/changeset/261165>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397960 [details].