---
title: "CMBlockBufferIsEmpty(_:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmblockbufferisempty(_:)"
---

# CMBlockBufferIsEmpty(_:)

Returns a Boolean value that indicates whether the buffer is empty.

## Declaration

```swift
func CMBlockBufferIsEmpty(_ theBuffer: CMBlockBuffer) -> Bool
```

## Parameters

- `theBuffer`: CMBlockBuffer to examine. Must not be NULL.

## Return Value

Return Value False if the CMBlockBuffer is NULL.

## Discussion

Discussion Determines whether the given CMBlockBuffer is empty, i.e., devoid of any memoryBlocks or CMBlockBuffer references. Note that a CMBlockBuffer containing a not-yet allocated memoryBlock is not considered empty.

## See Also

### Inspecting a Block Buffer

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