<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMBlockBufferFillDataBytes(with:blockBuffer:offsetIntoDestination:dataLength:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@F@CMBlockBufferFillDataBytes"
  },
  "title" : "CMBlockBufferFillDataBytes(with:blockBuffer:offsetIntoDestination:dataLength:)"
}
-->

# CMBlockBufferFillDataBytes(with:blockBuffer:offsetIntoDestination:dataLength:)

Fills the destination buffer with the specified data byte.

```
func CMBlockBufferFillDataBytes(with fillByte: CChar, blockBuffer destinationBuffer: CMBlockBuffer, offsetIntoDestination: Int, dataLength: Int) -> OSStatus
```

## Parameters

`fillByte`

The data byte with which to fill the destination buffer.

`destinationBuffer`

`CMBlockBuffer` into which the data bytes are filled.

`offsetIntoDestination`

Start of data area for the buffer.

`dataLength`

Length of the valid data area for the buffer.

## Return Value

Returns `kCMBlockBufferNoErr` if successful.

## Discussion

---

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)