---
title: makeMutablePixelBuffer()
framework: avfoundation
role: symbol
role_heading: Instance Method
path: avfoundation/avvideocompositionrendercontext/makemutablepixelbuffer()
---

# makeMutablePixelBuffer()

Vends a CVMutablePixelBuffer to use for rendering. The buffer will have its kCVImageBufferCleanApertureKey and kCVImageBufferPixelAspectRatioKey attachments set to match the current composition processor properties.

## Declaration

```swift
func makeMutablePixelBuffer() throws -> CVMutablePixelBuffer
```

## Return Value

Return Value A CVMutablePixelBuffer to use for rendering.

## Discussion

Discussion note: Insufficient memory or other system error.

## See Also

### Creating the pixel buffer

- [newPixelBuffer()](avfoundation/avvideocompositionrendercontext/newpixelbuffer().md)
