Bug 277140 - [MSE] Incorrect calculations in evictable content when using mp4
Summary: [MSE] Incorrect calculations in evictable content when using mp4
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jean-Yves Avenard [:jya]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-07-26 05:19 PDT by Jean-Yves Avenard [:jya]
Modified: 2024-07-26 07:11 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Yves Avenard [:jya] 2024-07-26 05:19:44 PDT
Seens in the console:
```
024-07-26 21:39:05.863854+1000 0x4B5EF1   Default   0x0                  72312  0 com.apple.WebKit.GPU.Development: (CoreMedia) [com.apple.coremedia:excessive] <<<< SampleBuffer >>>> CMSampleBufferCallForEachSample signalled err=1 (err) ([aborting loop early due to error from callback]) at FigSampleBuffer.c:5237
0   CoreMedia                           0x000000019bba036c CMSampleBufferCallForEachSample + 1504    [0x19bafb000 + 676716]
1   WebCore                             0x00000003029f071c _ZN3PAL55softLink_CoreMedia_CMSampleBufferCallBlockForEachSampleEP20opaqueCMSampleBufferU13block_pointerFiS1_lE + 48    [0x300000000 + 43976476]
```

To calculate how much data can be evicted from a source buffer we iterate over the samples to see which is to be ignored.

It appears that `CMSampleBufferCallForEachSample` performs a speed throttling which cause the calculation to return 0 (and leading to a sync call)
Comment 1 Radar WebKit Bug Importer 2024-07-26 05:20:01 PDT
<rdar://problem/132565283>
Comment 2 Jean-Yves Avenard [:jya] 2024-07-26 06:05:50 PDT
Pull request: https://github.com/WebKit/WebKit/pull/31290