Bug 303001
| Summary: | AudioVideoRenderer will constantly request for more data even if earlier request not serviced. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Component: | Media | Assignee: | 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 | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=303017 | ||
Jean-Yves Avenard [:jya]
When you call AudioVideoRenderer::requestMediaDataWhenReady()
the callback can be called, under some circumstances infinitely such as when debugging the process
the API contract should be changed where the AudioVideoRenderer only calls once the callback, and remove the need to call `AudioVideoRenderer::stopRequestingMediaData` each time.
The API contract should be:
if AudioVideoRenderer::isReadyForMoreSamples returns false,
then you call AudioVideoRenderer::requestMediaDataWhenReady() once.
The AudioVideoRenderer will only call the callback once, and will not do so again until `AudioVideoRenderer::requestMediaDataWhenReady` is called again.
The AudioVideoRenderer API mimicked the AVSampleBufferDisplayLayer and AVSampleBufferAudioRenderer which requires you to call `stopRequestingMediaData` ; but when used over IPC, the request to cancel may not come quickly enough, and the AVSampleBufferAudioRenderer will call the callback repeatedly leading to massive memory usage as a new IPC message is created but never serviced (if the web process is suspended)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/165259808>
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/54374
EWS
Committed 303456@main (2a2382187dbc): <https://commits.webkit.org/303456@main>
Reviewed commits have been landed. Closing PR #54374 and removing active labels.