[Webkit-unassigned] [Bug 283448] New: [mp4] requestVideoFrameCallback returns for the wrong frame

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 20 16:56:54 PST 2024


https://bugs.webkit.org/show_bug.cgi?id=283448

            Bug ID: 283448
           Summary: [mp4] requestVideoFrameCallback returns for the wrong
                    frame
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jean-yves.avenard at apple.com

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241121/7250646a/attachment.htm>


More information about the webkit-unassigned mailing list