---
title: "CMBlockBufferFillDataBytes(with:blockBuffer:offsetIntoDestination:dataLength:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmblockbufferfilldatabytes(with:blockbuffer:offsetintodestination:datalength:)"
---

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

Fills the destination buffer with the specified data byte.

## Declaration

```swift
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

Return Value Returns kCMBlockBufferNoErr if successful.

## See Also

### Modifying a Block Buffer

- [CMBlockBufferAppendMemoryBlock(_:memoryBlock:length:blockAllocator:customBlockSource:offsetToData:dataLength:flags:)](coremedia/cmblockbufferappendmemoryblock(_:memoryblock:length:blockallocator:customblocksource:offsettodata:datalength:flags:).md)
- [CMBlockBufferAppendBufferReference(_:targetBBuf:offsetToData:dataLength:flags:)](coremedia/cmblockbufferappendbufferreference(_:targetbbuf:offsettodata:datalength:flags:).md)
- [CMBlockBufferAssureBlockMemory(_:)](coremedia/cmblockbufferassureblockmemory(_:).md)
- [CMBlockBufferAccessDataBytes(_:atOffset:length:temporaryBlock:returnedPointerOut:)](coremedia/cmblockbufferaccessdatabytes(_:atoffset:length:temporaryblock:returnedpointerout:).md)
- [CMBlockBufferCopyDataBytes(_:atOffset:dataLength:destination:)](coremedia/cmblockbuffercopydatabytes(_:atoffset:datalength:destination:).md)
- [CMBlockBufferReplaceDataBytes(with:blockBuffer:offsetIntoDestination:dataLength:)](coremedia/cmblockbufferreplacedatabytes(with:blockbuffer:offsetintodestination:datalength:).md)
