[Webkit-unassigned] [Bug 226481] [MSE] When mediaSample of the same pts and dts are received consecutively, the mediaSample received later are discarded.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 15 04:01:33 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=226481

--- Comment #10 from Jean-Yves Avenard [:jya] <jean-yves.avenard at apple.com> ---
Comment on attachment 430239
  --> https://bugs.webkit.org/attachment.cgi?id=430239
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=430239&action=review

> Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:1165
> +        if (trackBuffer.lastDecodeTimestamp.isValid() && decodeTimestamp == trackBuffer.lastDecodeTimestamp) {

This code is fundamentally incorrect. A dts value is meaningless, its only purpose is to determine in which order the frames should be decoded.
It should never be used to determine which frame should be removed or where it should be inserted. 
There's no guarantee that a stream will use the same timeframe from one sample to another. The only thing that matters is that they are monotonically increasing.

Only the presentation timestamp is relevant and should be used to determine what should be removed and where.

When a PTS sample is to be removed, the entire GOP (group of picture) should be removed from that sample forward.
E.g you remove all samples from that sample, until the next keyframe is found.

The concept is touched on in MSE's Coded Frame Removal algorithm
https://w3c.github.io/media-source/#dfn-coded-frame-removal

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210615/7928413b/attachment.htm>


More information about the webkit-unassigned mailing list