NEW 283448
[mp4] requestVideoFrameCallback returns for the wrong frame
https://bugs.webkit.org/show_bug.cgi?id=283448
Summary [mp4] requestVideoFrameCallback returns for the wrong frame
Jean-Yves Avenard [:jya]
Reported 2024-11-20 16:56:54 PST
In bug the test does: ``` v.src = "content/test-video-only.mp4"; await waitFor(v, 'loadedmetadata', true); // time of the last video frame. v.currentTime = 6.009; const seekPromise = waitFor(v, 'seeked', true); const data = await waitForVideoFrame(v); testExpected(data[1].mediaTime, 6.009); testExpected(data[1].width, 320); testExpected(data[1].height, 240); ``` the time of the last frame is 6.009 to 06.042 the test fails with: ``` --- /Users/jyavenard/Work/webkit/OpenSource/WebKitBuild/Debug/layout-test-results/media/media-rvfc-paused-offscreen-mp4-expected.txt +++ /Users/jyavenard/Work/webkit/OpenSource/WebKitBuild/Debug/layout-test-results/media/media-rvfc-paused-offscreen-mp4-actual.txt @@ -1,4 +1,4 @@ -EXPECTED (6.009 == '6.009') OK +EXPECTED (5.976 == '6.009'), OBSERVED '5.976' FAIL EXPECTED (320 == '320') OK EXPECTED (240 == '240') OK ``` 5.976 is the time of the second last frame. Per spec: ``` mediaTime, of type double The media presentation timestamp (PTS) in seconds of the frame presented (e.g. its timestamp on the video.currentTime timeline). MAY have a zero value for live-streams or WebRTC applications. ``` https://wicg.github.io/video-rvfc/#video-frame-callback-metadata-attributes currentTime is 6.009 as this is where we seeked to.
Attachments
Radar WebKit Bug Importer
Comment 1 2024-11-27 16:57:13 PST
Note You need to log in before you can comment on or make changes to this bug.