RESOLVED FIXED305208
[MSE] Fix sample DTS to prevent deletion of preexisting samples when PTS doesn't conflict
https://bugs.webkit.org/show_bug.cgi?id=305208
Summary [MSE] Fix sample DTS to prevent deletion of preexisting samples when PTS does...
Enrique Ocaña
Reported 2026-01-09 09:21:36 PST
(This text is best viewed using a monospace font) Let's consider a preexisting samples A, B, C, and a new sample N with the following timestamps: Decoding time Presentation time ------------- ----------------- Sample A: 827.826164000 827.826164000 Sample B: 827.826164100 827.826164100 Sample C: 827.826164200 827.826164200 Sample N: 827.826125000 827.909542000 These disparities in DTS vs. PTS offsets between samples A and B exist because both samples come from completely different videos (eg: because of ad insertion). In a timeline: DTS ···NABC······· PTS ····ABC···N··· Judging by PTS, the samples A, B, C should remain and theoretically don't need to be erased. However, considering DTS, the samples A, B, C have to be erased, because the sample N would reach the video decoder earlier (by decoding ordering) and change the state of the decoder, making it unsuitable for samples A, B, C. It would be nice to find a way to avoid erasing samples A, B, C in this specific case.
Attachments
Enrique Ocaña
Comment 1 2026-01-09 09:29:11 PST
Enrique Ocaña
Comment 3 2026-01-13 10:32:12 PST
Some of the detected test failures are caused by the fact that edit list support is disabled in WebKitGTK, and this is creating small offsets that trigger unnecessary "out-of-order frame detected" events. I've also tested the patch in downstream wpe-2.38[1] (with edit lists support), running the layout test there, and the mediasource-config-change-mp4-v-framerate.html test at least passes, but video decoding errors appear. This is enough evidence to consider the fix as problematic. I'm withdrawing this PR by now. [1] https://github.com/WebPlatformForEmbedded/WPEWebKit/tree/eocanha/eocanha-debug-160
Enrique Ocaña
Comment 4 2026-01-27 15:22:11 PST
EWS
Comment 5 2026-02-12 04:50:19 PST
Committed 307359@main (13a26d1f9065): <https://commits.webkit.org/307359@main> Reviewed commits have been landed. Closing PR #57363 and removing active labels.
Radar WebKit Bug Importer
Comment 6 2026-02-12 04:51:12 PST
Note You need to log in before you can comment on or make changes to this bug.