<?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>314723</bug_id>
          
          <creation_ts>2026-05-13 05:59:38 -0700</creation_ts>
          <short_desc>[MSE] Narrow processMediaSample&apos;s decode-key cleanup to true orphans and equal-key replacement</short_desc>
          <delta_ts>2026-05-15 00:01:56 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</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="Jean-Yves Avenard [:jya]">jean-yves.avenard</reporter>
          <assigned_to name="Jean-Yves Avenard [:jya]">jean-yves.avenard</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2210476</commentid>
    <comment_count>0</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2026-05-13 05:59:38 -0700</bug_when>
    <thetext>Address a latent gap in MSE &quot;Coded Frame Processing&quot; 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()-&gt;first)
    survive both step 1.14&apos;s sync cascade (which uses findSampleAfterDecodeKey
    = upper_bound, strictly greater) and step 1.15&apos;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&apos;s.

Spec issues were lodged as 
https://github.com/w3c/media-source/issues/374
and https://github.com/w3c/media-source/issues/375</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2210477</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-05-13 05:59:44 -0700</bug_when>
    <thetext>&lt;rdar://problem/176971800&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2210711</commentid>
    <comment_count>2</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2026-05-13 18:00:26 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/64888</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2211133</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-05-15 00:01:54 -0700</bug_when>
    <thetext>Committed 313296@main (9d7e16e79a52): &lt;https://commits.webkit.org/313296@main&gt;

Reviewed commits have been landed. Closing PR #64888 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>