Bug 283448
Summary: | [mp4] requestVideoFrameCallback returns for the wrong frame | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Jean-Yves Avenard [:jya]
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/140638350>