---
title: flush()
framework: avfoundation
role: symbol
role_heading: Instance Method
path: avfoundation/avqueuedsamplebufferrendering/flush()
---

# flush()

Discards all pending enqueued sample buffers.

## Declaration

```swift
func flush()
```

## Discussion

Discussion It is not possible to determine which sample buffers have been decoded for video. The next frame passed to enqueue(_:) should be an IDR frame (also known as a key frame or sync sample).
