Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4bf9354c493ce8d566c6deb71ee0dce97d810c22
      
https://github.com/WebKit/WebKit/commit/4bf9354c493ce8d566c6deb71ee0dce97d810c22
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2026-03-05 (Thu, 05 Mar 2026)

  Changed paths:
    M Source/WebCore/PAL/pal/cf/CoreAudioExtras.h
    M Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.cpp
    M Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h
    M Source/WebCore/platform/audio/cocoa/AudioFileReaderCocoa.cpp
    M Source/WebCore/platform/graphics/cocoa/CMUtilities.h
    M Source/WebCore/platform/graphics/cocoa/CMUtilities.mm
    M Source/WebCore/platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm

  Log Message:
  -----------
  Decoding webm file with more than 2 channels will fail
https://bugs.webkit.org/show_bug.cgi?id=229325
rdar://82160691

Reviewed by Jer Noble.

This adds support for decoding streams with multi-channels audio whenever
AudioToolbox decoder supports multi-channels audio.

For codec with an Ogg channel layout, decoded PCM channels will be re-ordered
following W3C specs (SMPTE).
For other codecs, we keep the existing behaviour of returning the codec's native
ordering as that's what webkit on cocoa platform has been doing (incorrectly)
since the start of time.

* Source/WebCore/PAL/pal/cf/CoreAudioExtras.h:
(PAL::allocationSize):
(PAL::createAudioChannelLayout):
* Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.cpp:
* Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h:
* Source/WebCore/platform/audio/cocoa/AudioFileReaderCocoa.mm:
(WebCore::SMPTEEquivalentLayout):
(WebCore::AudioFileReader::decodeData const):
* Source/WebCore/platform/graphics/cocoa/CMUtilities.h:
* Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:
(WebCore::channelLayoutFromChannelLayoutTag):
(WebCore::channelLayoutDescription):
* Source/WebCore/platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm:
(WebCore::createAudioInfoForFormat):

Canonical link: https://commits.webkit.org/308749@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to