---
title: clientStateToRestore
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avplannedsegmentwritingrequest/clientstatetorestore
---

# clientStateToRestore

## Declaration

```swift
var clientStateToRestore: Data? { get }
```

## Discussion

Discussion The client state persisted from the previous segment, if any. Specifically, this is the NSData provided to the previous segment’s finishWithClientState: method. The client is responsible to restore its client state before writing the current segment. For example, clients such as compositors with a temporal element may need some processing history of previous samples in order to generate an output sample at time N.  This will be nil for algorithms that are stateless.
