<?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>268987</bug_id>
          
          <creation_ts>2024-02-08 07:37:16 -0800</creation_ts>
          <short_desc>[Cocoa] WebCodecs H264 decoder is not always reordering frames according presentation time</short_desc>
          <delta_ts>2024-03-07 11:23:24 -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>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="youenn fablet">youennf</reporter>
          <assigned_to name="youenn fablet">youennf</assigned_to>
          <cc>marcello</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2011740</commentid>
    <comment_count>0</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2024-02-08 07:37:16 -0800</bug_when>
    <thetext>Follow up to https://bugs.webkit.org/show_bug.cgi?id=263901, it seems that not all video streams get reordered properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011742</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-02-08 07:38:07 -0800</bug_when>
    <thetext>&lt;rdar://problem/122544744&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011743</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2024-02-08 07:38:22 -0800</bug_when>
    <thetext>Full repro steps from Marcello:
- pull the code:
  - either from https://github.com/marcello3d/webcodecs/tree/marcello/frame-out-of-order-logging
  - apply the patch yourself to https://github.com/w3c/webcodecs https://patch-diff.githubusercontent.com/raw/w3c/webcodecs/pull/734.patch
- run the server with `node server` in the samples folder
- open http://localhost:8888/ in safari
- open developer console to see javascript logs
- leave settings at 2D &amp; h264
- click start</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011755</commentid>
    <comment_count>3</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2024-02-08 08:17:12 -0800</bug_when>
    <thetext>Our parsing of SPS is not liking samples/data/bbb_video_avc_frag.mp4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011759</commentid>
    <comment_count>4</comment_count>
    <who name="Marcello Bastea-Forte">marcello</who>
    <bug_when>2024-02-08 08:27:12 -0800</bug_when>
    <thetext>I can find more test files, if that’s helpful. This is basically the last technical blocker to getting descript.com working on Safari/ipad/iphone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011766</commentid>
    <comment_count>5</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2024-02-08 08:37:24 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/24076</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2012124</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-02-09 01:25:22 -0800</bug_when>
    <thetext>Committed 274353@main (875db7cbec49): &lt;https://commits.webkit.org/274353@main&gt;

Reviewed commits have been landed. Closing PR #24076 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019274</commentid>
    <comment_count>7</comment_count>
    <who name="Marcello Bastea-Forte">marcello</who>
    <bug_when>2024-03-06 22:19:00 -0800</bug_when>
    <thetext>okay I just tested this on Safari Technology Preview 190 (Safari 17.4, WebKit 19619.1.5.5.2)

it&apos;s fixed on the h264 example, hurray! 

But the h265 example still fails :(

Error: Decoded frame 166666 µs out of order, last frame was 200000 µs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019391</commentid>
    <comment_count>8</comment_count>
    <who name="Marcello Bastea-Forte">marcello</who>
    <bug_when>2024-03-07 11:23:24 -0800</bug_when>
    <thetext>filed the new bug as https://bugs.webkit.org/show_bug.cgi?id=270645</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>