Bug 245081

Summary: [MSE] Round SourceBuffer removal range
Product: WebKit Reporter: Enrique Ocaña <eocanha>
Component: MediaAssignee: Enrique Ocaña <eocanha>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Enrique Ocaña 2022-09-12 09:19:36 PDT
Representation of removal times as double in SourceBuffer::remove() can cause problems in HBOMax due to precision/rounding problems.

In some problematic cases an unintended frame would be marked for removal because of the very small overlap that could come from precision lost. For instance, HBOMax uses the PTS of the next sample as removal 'end' and unexpectedly removes the next segment (as it's a sync frame) sometimes.

Rounding the double removal range delimiters to nanoseconds would help to avoid those problematic cases.
Comment 1 Enrique Ocaña 2022-09-12 10:00:14 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4266
Comment 2 EWS 2022-09-14 05:24:56 PDT
Committed 254472@main (2fc32818fdd2): <https://commits.webkit.org/254472@main>

Reviewed commits have been landed. Closing PR #4266 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-09-14 05:25:20 PDT
<rdar://problem/99914941>