Bug 228215 - MP3 decoder ignoring XIPH header related to encoder delay and padding information
Summary: MP3 decoder ignoring XIPH header related to encoder delay and padding informa...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-22 19:57 PDT by Jean-Yves Avenard [:jya]
Modified: 2021-08-18 15:29 PDT (History)
2 users (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] 2021-07-22 19:57:02 PDT
Consider the following case:

STR:

1- Open https://jyavenard.github.io/htmltests/tests/webaudio/decodeAudioData.html
2- Select half-a-second-48000.mp3 at the bottom of the list
3- Click on play

Safari will show 26496 frames 0.552s.

This file is exactly .5s long and made of 24000 frames.

It contains a XIPH header that provides the encoder delay and padding information.

Chrome and Firefox properly parse those MP3 which results in a continuous audio stream when looping. On Safari you can here the incorrectly generated blank frames.

The ability the produce frame-exact content is important for web audio applications. 

WebKit uses ExtAudioFileRead to demux and decode this file and it returns too many frames.
Comment 1 Radar WebKit Bug Importer 2021-07-22 19:57:24 PDT
<rdar://problem/80998793>
Comment 2 Jean-Yves Avenard [:jya] 2021-08-18 15:29:15 PDT
this got fixed on macOS Monterey.