---
title: "CMSampleBufferGetFormatDescription(_:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmsamplebuffergetformatdescription(_:)"
---

# CMSampleBufferGetFormatDescription(_:)

Returns the format description of the samples in a sample buffer.

## Declaration

```swift
func CMSampleBufferGetFormatDescription(_ sbuf: CMSampleBuffer) -> CMFormatDescription?
```

## Parameters

- `sbuf`: The CMSampleBuffer being interrogated.

## Return Value

Return Value The format description of the samples in the CMSampleBuffer or NULL if there is an error.

## Discussion

Discussion On return, the caller doesn’t own the returned formatDesc, and must retain it explicitly if the caller needs to maintain a reference to it.
