Bug 305208
| Summary: | [MSE] Fix sample DTS to prevent deletion of preexisting samples when PTS doesn't conflict | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Enrique Ocaña <eocanha> |
| Component: | New Bugs | Assignee: | 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 | ||
Enrique Ocaña
(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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Enrique Ocaña
Pull request: https://github.com/WebKit/WebKit/pull/56346
Enrique Ocaña
See: https://github.com/WebPlatformForEmbedded/WPEWebKit/issues/1542
Enrique Ocaña
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
Re-opening for pull request https://github.com/WebKit/WebKit/pull/57363
EWS
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
<rdar://problem/170225068>