<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/kCMSampleBufferAttachmentKey_EndsPreviousSampleDuration",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@kCMSampleBufferAttachmentKey_EndsPreviousSampleDuration"
  },
  "title" : "kCMSampleBufferAttachmentKey_EndsPreviousSampleDuration"
}
-->

# kCMSampleBufferAttachmentKey_EndsPreviousSampleDuration

Indicates that sample buffer’s decode timestamp may be used to define the previous sample buffer’s duration (type `CFBoolean`, default false).

```
let kCMSampleBufferAttachmentKey_EndsPreviousSampleDuration: CFString
```

## Discussion

Marker sample buffers with this attachment may be used in situations where sample buffers are transmitted        before their duration is known. In such situations, normally the recipient may use each sample buffer’s timestamp        to calculate the duration of the previous sample buffer. The marker sample buffer with this attachment is sent        to provide the timestamp for calculating the final sample buffer’s duration.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)