Bug 314723

Summary: [MSE] Narrow processMediaSample's decode-key cleanup to true orphans and equal-key replacement
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 2026-05-13 05:59:38 PDT
Address a latent gap in MSE "Coded Frame Processing" step 1.15 and tighten the B-frame DTS re-key guard it sits next to. The gap: samples whose decode key lies in [incoming.decodeKey, erasedSamples.decodeOrder().begin()->first) survive both step 1.14's sync cascade (which uses findSampleAfterDecodeKey = upper_bound, strictly greater) and step 1.15's main dependents sweep (which starts at erasedSamples.begin()). The block originally added in 205636@main covered this gap, but its range was too wide (lower_bound inclusive on both ends), so it also erased legitimate next-GOP samples when the cascade had deliberately broken early on a sync whose pts was greater than the incoming sample's. Spec issues were lodged as https://github.com/w3c/media-source/issues/374 and https://github.com/w3c/media-source/issues/375
Attachments
Radar WebKit Bug Importer
Comment 1 2026-05-13 05:59:44 PDT
Jean-Yves Avenard [:jya]
Comment 2 2026-05-13 18:00:26 PDT
EWS
Comment 3 2026-05-15 00:01:54 PDT
Committed 313296@main (9d7e16e79a52): <https://commits.webkit.org/313296@main> Reviewed commits have been landed. Closing PR #64888 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.