<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaExtension",
  "identifier" : "/documentation/MediaExtension/MESampleCursor/samplesWithLaterDTSsMayHaveEarlierPTSs(than:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MediaExtension"
    ],
    "preciseIdentifier" : "c:objc(pl)MESampleCursor(im)samplesWithLaterDTSsMayHaveEarlierPTSsThanCursor:"
  },
  "title" : "samplesWithLaterDTSsMayHaveEarlierPTSs(than:)"
}
-->

# samplesWithLaterDTSsMayHaveEarlierPTSs(than:)

Tests for a later boundary in sample reordering.

```
optional func samplesWithLaterDTSsMayHaveEarlierPTSs(than cursor: any MESampleCursor) -> Bool
```

## Parameters

`cursor`

A sample cursor to use to test the sample reordering boundary.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if it’s possible that later samples in decode order can have an earlier presentation timestamp than that of the specified cursor; otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

This method tests for a boundary in the reordering from decode order to presentation order. This determines when it’s possible for any sample later in decode order than the current sample to have an earllier presentation time than the current sample of the specified cursor. You can use this test to limit backward scans, such as to start forward playback. For example, with the argument cursor fixed, step the cursor forward until it’s impossible for any later-in-decode-order samples to be earlier-in-presentation-order than the argument cursor sample.

Don’t implement this method for formats where sample reordering doesn’t make sense for the track content, which also indicates that the samples aren’t reordered.

> Important:
> Only pass a cursor to this method that references the same sequence of samples as the cursor you call this method on, such as that the same instance of ``doc://com.apple.mediaextension/documentation/MediaExtension/METrackReader`` created. Otherwise, the result is undefined.

---

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)