<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMMutableDataBlockBuffer/init(subBlockCapacity:blockSource:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "s:9CoreMedia24CMMutableDataBlockBufferV03subE8Capacity11blockSourceACSi_AC0eJ0VSgtcfc"
  },
  "title" : "init(subBlockCapacity:blockSource:)"
}
-->

# init(subBlockCapacity:blockSource:)

Creates a block buffer with at least `subBlockCapacity` number of sub blocks.

```
init(subBlockCapacity: Int, blockSource: CMMutableDataBlockBuffer.BlockSource? = nil)
```

## Parameters

`subBlockCapacity`

Number of sub-blocks the new block buffer shall accommodate before expansion
occurs. A value of zero means “do the reasonable default”.

`blockSource`

Optional source to allocate and deallocate memory for the data blocks.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)