| Summary: | [MSE] Rework handling of SourceBuffer's buffer full. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| 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: | calvaris, eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, 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=225630 https://bugs.webkit.org/show_bug.cgi?id=226034 |
||||||||
| Attachments: |
|
||||||||
|
Description
Jean-Yves Avenard [:jya]
2021-06-07 00:55:04 PDT
Created attachment 430730 [details]
Patch
Comment on attachment 430730 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=430730&action=review > Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:726 > + if (WTF::sumOverflows<uint64_t>(totalTrackBufferSizeInBytes(), requiredSize)) > + return true; > + > + return totalTrackBufferSizeInBytes() + requiredSize >= maximumBufferSize; Irrespective of the overall patch, this performs the addition twice. It would probably be more efficient to do something like: uint64_t totalRequired = 0; if (CheckedState::DidOverflow == CheckedSum(totalTrackBufferSizeInBytes(), requiredSize).safeGet(totalRequired); return true; return totalRequired >= maximumBufferSize; Created attachment 430806 [details]
Patch
Comment on attachment 430806 [details]
Patch
test failures unrelated to media's MSE
jean-yves.avenard@apple.com does not have committer permissions according to https://raw.githubusercontent.com/WebKit/WebKit/main/Tools/Scripts/webkitpy/common/config/contributors.json. Rejecting attachment 430806 [details] from commit queue. jean-yves.avenard@apple.com does not have committer permissions according to https://raw.githubusercontent.com/WebKit/WebKit/main/Tools/Scripts/webkitpy/common/config/contributors.json. Rejecting attachment 430806 [details] from commit queue. jean-yves.avenard@apple.com does not have committer permissions according to https://raw.githubusercontent.com/WebKit/WebKit/main/Tools/Scripts/webkitpy/common/config/contributors.json. Rejecting attachment 430806 [details] from commit queue. Committed r278603 (238592@main): <https://commits.webkit.org/238592@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 430806 [details]. |