<!--
{
  "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/CMBlockBufferIsRangeContiguous(_:atOffset:length:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@F@CMBlockBufferIsRangeContiguous"
  },
  "title" : "CMBlockBufferIsRangeContiguous(_:atOffset:length:)"
}
-->

# CMBlockBufferIsRangeContiguous(_:atOffset:length:)

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

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

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

## 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.

---

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)