Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 40f62db2b0a18f38fb7d9cd79fade5978e585fd6
      
https://github.com/WebKit/WebKit/commit/40f62db2b0a18f38fb7d9cd79fade5978e585fd6
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2026-07-03 (Fri, 03 Jul 2026)

  Changed paths:
    M Source/WebCore/platform/graphics/cocoa/CMUtilities.mm
    M Tools/TestWebKitAPI/Tests/WebCore/cocoa/CoreMediaUtilities.mm

  Log Message:
  -----------
  com.apple.WebKit.WebContent at com.apple.WebCore:  
WebCore::createVideoInfoFromFormatDescription
https://bugs.webkit.org/show_bug.cgi?id=317652
rdar://175430748

Reviewed by Eric Carlson.

Per CMFormatDescription documentation:
```
The extension is a CFDictionary mapping CFStrings of the four-char-code atom 
types
to either CFDatas containing the atom payload or (to represent multiple atoms 
of a
specific type) to CFArrays of CFData containing those payloads.
```

The conversion from CMVideoFormatDescription to VideoTrackInfo only handled
the first case, leading to a crash if the latter was used.

Test: Tools/TestWebKitAPI/Tests/WebCore/cocoa/CoreMediaUtilities.mm

* Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:
(WebCore::parseExtensionAtomsDictionary):
(WebCore::createExtensionAtomsDictionary):
(WebCore::getEncryptionDataCollection):
(WebCore::createVideoInfoFromFormatDescription):
* Tools/TestWebKitAPI/Tests/WebCore/cocoa/CoreMediaUtilities.mm:
(TestWebKitAPI::makeVideoFormatDescriptionWithAtoms):
(TestWebKitAPI::TEST(CMUtilities, ExtensionAtomsCFArrayValueDoesNotCrash)):
(TestWebKitAPI::TEST(CMUtilities, ExtensionAtomsCFDataValueIngest)):
(TestWebKitAPI::makeVideoInfoWithAtoms):
(TestWebKitAPI::TEST(CMUtilities, 
CreateFormatDescriptionEmitsCFDataForSingleAtom)):
(TestWebKitAPI::TEST(CMUtilities, 
CreateFormatDescriptionEmitsCFArrayForMultipleAtomsSameFourCC)):
(TestWebKitAPI::TEST(CMUtilities, 
CreateFormatDescriptionGroupsNonContiguousDuplicates)):
(TestWebKitAPI::TEST(CMUtilities, 
ExtensionAtomsRoundTripPreservesMultipleSameFourCC)):

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



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

Reply via email to