<!--
{
  "documentType" : "article",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/sample-buffer-errors",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Sample Buffer Error Codes"
}
-->

# Sample Buffer Error Codes

Errors that occur when processing sample buffer objects.

## Topics

### Error Codes

[`kCMSampleBufferError_AllocationFailed`](/documentation/CoreMedia/kCMSampleBufferError_AllocationFailed)

An error code that indicates the system failed to allocate memory.

[`kCMSampleBufferError_AlreadyHasDataBuffer`](/documentation/CoreMedia/kCMSampleBufferError_AlreadyHasDataBuffer)

An error code that indicates an attempt to set data on a sample buffer failed because that buffer already contains media data.

[`kCMSampleBufferError_ArrayTooSmall`](/documentation/CoreMedia/kCMSampleBufferError_ArrayTooSmall)

An error code that indicates the output array isn’t large enough to hold the requested array.

[`kCMSampleBufferError_BufferHasNoSampleSizes`](/documentation/CoreMedia/kCMSampleBufferError_BufferHasNoSampleSizes)

An error code that indicates a request for sample sizes on a buffer failed because the buffer doesn’t provide that information.

[`kCMSampleBufferError_BufferHasNoSampleTimingInfo`](/documentation/CoreMedia/kCMSampleBufferError_BufferHasNoSampleTimingInfo)

An error code that indicates a request for sample timing on a buffer failed because the buffer doesn’t contain that information.

[`kCMSampleBufferError_BufferNotReady`](/documentation/CoreMedia/kCMSampleBufferError_BufferNotReady)

An error code that indicates the system can’t make the buffer’s data ready for use.

[`kCMSampleBufferError_CannotSubdivide`](/documentation/CoreMedia/kCMSampleBufferError_CannotSubdivide)

An error code that indicates a sample buffer doesn’t contain sample sizes.

[`kCMSampleBufferError_DataCanceled`](/documentation/CoreMedia/kCMSampleBufferError_DataCanceled)

An error code that indicates a sample buffer canceled its data-loading operation.

[`kCMSampleBufferError_DataFailed`](/documentation/CoreMedia/kCMSampleBufferError_DataFailed)

An error code that indicates a sample buffer failed to load its data.

[`kCMSampleBufferError_InvalidEntryCount`](/documentation/CoreMedia/kCMSampleBufferError_InvalidEntryCount)

An error code that indicates a timing or size value isn’t within the allowed range.

[`kCMSampleBufferError_InvalidMediaFormat`](/documentation/CoreMedia/kCMSampleBufferError_InvalidMediaFormat)

An error code that indicates the media format doesn’t match the sample buffer’s format description.

[`kCMSampleBufferError_InvalidMediaTypeForOperation`](/documentation/CoreMedia/kCMSampleBufferError_InvalidMediaTypeForOperation)

An error code that indicates the media type that the format description defines isn’t a value for the requested operation.

[`kCMSampleBufferError_InvalidSampleData`](/documentation/CoreMedia/kCMSampleBufferError_InvalidSampleData)

An error code that indicates the sample buffer contains bad data.

[`kCMSampleBufferError_Invalidated`](/documentation/CoreMedia/kCMSampleBufferError_Invalidated)

An error code that indicates a sample buffer invalidated its data.

[`kCMSampleBufferError_RequiredParameterMissing`](/documentation/CoreMedia/kCMSampleBufferError_RequiredParameterMissing)

An error code that indicates a required parameter’s value is invalid.

[`kCMSampleBufferError_SampleIndexOutOfRange`](/documentation/CoreMedia/kCMSampleBufferError_SampleIndexOutOfRange)

An error code that indicates the sample index is outside the range of samples that the buffer contains.

[`kCMSampleBufferError_SampleTimingInfoInvalid`](/documentation/CoreMedia/kCMSampleBufferError_SampleTimingInfoInvalid)

An error code that indicates the sample buffer unexpectedly contains nonnumeric sample-timing information.



---

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)