---
title: "CMBlockBufferIsRangeContiguous(_:atOffset:length:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmblockbufferisrangecontiguous(_:atoffset:length:)"
---

# CMBlockBufferIsRangeContiguous(_:atOffset:length:)

Returns a Boolean value that indicates whether the specified range within a block buffer is contiguous.

## Declaration

```swift
func CMBlockBufferIsRangeContiguous(_ theBuffer: CMBlockBuffer, atOffset offset: Int, length: Int) -> Bool
```

## Parameters

- `theBuffer`: CMBlockBuffer to examine. Must not be NULL.
- `offset`: Offset within the buffer’s offset range.
- `length`: Desired number of bytes to access at offset. If zero, the number of bytes available at offset (dataLength – offset), contiguous or not, is used.

## Return Value

Return Value Returns true if the specified range is contiguous within the CMBlockBuffer, false otherwise. Also returns false if the CMBlockBuffer is NULL or empty.

## Discussion

Discussion Determines whether the specified range within the given CMBlockBuffer is contiguous. If CMBlockBufferGetDataPointer() were called with the same parameters, the returned pointer would address the desired number of bytes.

## See Also

### Inspecting a Block Buffer

- [CMBlockBufferGetDataPointer(_:atOffset:lengthAtOffsetOut:totalLengthOut:dataPointerOut:)](coremedia/cmblockbuffergetdatapointer(_:atoffset:lengthatoffsetout:totallengthout:datapointerout:).md)
- [CMBlockBufferGetDataLength(_:)](coremedia/cmblockbuffergetdatalength(_:).md)
- [CMBlockBufferIsEmpty(_:)](coremedia/cmblockbufferisempty(_:).md)
