<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>305208</bug_id>
          
          <creation_ts>2026-01-09 09:21:36 -0800</creation_ts>
          <short_desc>[MSE] Fix sample DTS to prevent deletion of preexisting samples when PTS doesn&apos;t conflict</short_desc>
          <delta_ts>2026-02-12 04:51:12 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Enrique Ocaña">eocanha</reporter>
          <assigned_to name="Enrique Ocaña">eocanha</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2170697</commentid>
    <comment_count>0</comment_count>
    <who name="Enrique Ocaña">eocanha</who>
    <bug_when>2026-01-09 09:21:36 -0800</bug_when>
    <thetext>(This text is best viewed using a monospace font)

Let&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2170702</commentid>
    <comment_count>1</comment_count>
    <who name="Enrique Ocaña">eocanha</who>
    <bug_when>2026-01-09 09:29:11 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/56346</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2170703</commentid>
    <comment_count>2</comment_count>
    <who name="Enrique Ocaña">eocanha</who>
    <bug_when>2026-01-09 09:33:34 -0800</bug_when>
    <thetext>See: https://github.com/WebPlatformForEmbedded/WPEWebKit/issues/1542</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2171479</commentid>
    <comment_count>3</comment_count>
    <who name="Enrique Ocaña">eocanha</who>
    <bug_when>2026-01-13 10:32:12 -0800</bug_when>
    <thetext>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 &quot;out-of-order frame detected&quot; events.

I&apos;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&apos;m withdrawing this PR by now.

[1] https://github.com/WebPlatformForEmbedded/WPEWebKit/tree/eocanha/eocanha-debug-160</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2175573</commentid>
    <comment_count>4</comment_count>
    <who name="Enrique Ocaña">eocanha</who>
    <bug_when>2026-01-27 15:22:11 -0800</bug_when>
    <thetext>Re-opening for pull request https://github.com/WebKit/WebKit/pull/57363</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2180752</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-02-12 04:50:19 -0800</bug_when>
    <thetext>Committed 307359@main (13a26d1f9065): &lt;https://commits.webkit.org/307359@main&gt;

Reviewed commits have been landed. Closing PR #57363 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2180753</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-02-12 04:51:12 -0800</bug_when>
    <thetext>&lt;rdar://problem/170225068&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>