flush()
Instructs the layer to discard any enqueued sample buffers that are pending.
Declaration
func flush()Discussion
Apple discourages the use of this symbol in iOS 17, tvOS 17, and macOS 14 and later. Use flush() on the sampleBufferRenderer instead.
Because it’s not possible to determine which sample buffers have been decoded, the next frame passed to enqueue(_:) should be an IDR frame (also known as a key frame or sync sample).