Bug 302918

Summary: MediaPlayerPrivateWebM will attempt to re-enqueue more samples indefinitely even when the AudioVideoRenderer isn't ready for it
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: MediaAssignee: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Jean-Yves Avenard [:jya]
Reported 2025-11-20 22:08:01 PST
The AudioVideoRendererRemote only allows to enqueue up to 20 frames without getting a response from the GPU process. When 20 frames have been enqueued, AudioVideoRendererRemote::isReadyForMoreData() will return false ; when this occurs, the MediaPlayerPrivateWebM will call AudioVideoRendererRemote::requestMediaDataWhenReady() which does query the GPU process. The webm player attempts then to re-enqueue frame but isReadyForMoreData will still continue to return false ; causing an infinite loop and high CPU usage. We should only satisfy the request to requestMediaDataWhenReady when AudioVideoRendererRemote::isReadyForMoreData() is returning true.
Attachments
Radar WebKit Bug Importer
Comment 1 2025-11-20 22:08:11 PST
Jean-Yves Avenard [:jya]
Comment 2 2025-11-21 00:22:13 PST
EWS
Comment 3 2025-11-21 03:38:07 PST
Committed 303386@main (3484e3687b3c): <https://commits.webkit.org/303386@main> Reviewed commits have been landed. Closing PR #54301 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.