<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMSampleBufferAttachmentKeyDefinitions/endsPreviousSampleDuration",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "s:9CoreMedia38CMSampleBufferAttachmentKeyDefinitionsO26endsPreviousSampleDuration0A5Video012CVAttachmentF21DefinitionWithDefaultVyAE0M29ModePreferenceShouldPropagateOSbGvpZ"
  },
  "title" : "endsPreviousSampleDuration"
}
-->

# endsPreviousSampleDuration

Indicates that sample buffer’s decode timestamp may be used to define the previous sample buffer’s duration.

```
static let endsPreviousSampleDuration: CVAttachmentKeyDefinitionWithDefault<CMSampleBufferAttachmentKeyDefinitions.ShouldPropagate, Bool>
```

## 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. The getter returns the default value of
false if this attachment is not present.

---

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)