<?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>270645</bug_id>
          
          <creation_ts>2024-03-07 11:23:11 -0800</creation_ts>
          <short_desc>[Cocoa] WebCodecs HEVC decoder is not always reordering frames according presentation time</short_desc>
          <delta_ts>2024-05-07 09:18:41 -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>Safari Technology Preview</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 14</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="Marcello Bastea-Forte">marcello</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2019390</commentid>
    <comment_count>0</comment_count>
    <who name="Marcello Bastea-Forte">marcello</who>
    <bug_when>2024-03-07 11:23:11 -0800</bug_when>
    <thetext>Related: https://bugs.webkit.org/show_bug.cgi?id=268987, maybe followup for https://bugs.webkit.org/show_bug.cgi?id=265389 ?

The h265/HEVC test file on the webcodecs sample is returning decoded frames out of order:

Full repro steps:
- 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 renderer at 2D and select H.265 video codec
- click start

Result:
- 4 frames decoded then, Error: Decoded frame 166666 µs out of order, last frame was 200000 µs

Expected:
- it decodes the whole file</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019392</commentid>
    <comment_count>1</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2024-03-07 11:28:33 -0800</bug_when>
    <thetext>Should be fixed after https://commits.webkit.org/275434@main

*** This bug has been marked as a duplicate of bug 270096 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019442</commentid>
    <comment_count>2</comment_count>
    <who name="Marcello Bastea-Forte">marcello</who>
    <bug_when>2024-03-07 13:22:04 -0800</bug_when>
    <thetext>awesome, I guess that missed the STP 190 cutoff, I&apos;ll test in 191! Do you have a sense of when this fix would make it to end-users?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2028557</commentid>
    <comment_count>3</comment_count>
    <who name="Marcello Bastea-Forte">marcello</who>
    <bug_when>2024-04-15 11:08:14 -0700</bug_when>
    <thetext>This is still broken for me (same error from test in first comment) in Safari Technology Preview Release 192 (Safari 17.4, WebKit 19619.1.8.1)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2028558</commentid>
    <comment_count>4</comment_count>
    <who name="Marcello Bastea-Forte">marcello</who>
    <bug_when>2024-04-15 11:08:48 -0700</bug_when>
    <thetext>(on macOS 14.3.1 (23D60))</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2033661</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-05-07 02:12:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/127655559&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2033662</commentid>
    <comment_count>6</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2024-05-07 02:13:01 -0700</bug_when>
    <thetext>I can reproduce the issue, our VPS reading routine might need to cover more cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2033750</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-05-07 09:18:39 -0700</bug_when>
    <thetext>Committed 278462@main (1fb6c8c6fa42): &lt;https://commits.webkit.org/278462@main&gt;

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

    </bug>

</bugzilla>