<!--
{
  "availability" : [
    "iOS: 8.0.0 - 18.0.0",
    "iPadOS: 8.0.0 - 18.0.0",
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.8.0 - 15.0.0",
    "tvOS: 10.2.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVSampleBufferDisplayLayer/stopRequestingMediaData()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVSampleBufferDisplayLayer(im)stopRequestingMediaData"
  },
  "title" : "stopRequestingMediaData()"
}
-->

# stopRequestingMediaData()

Cancels any current media data request.

```
func stopRequestingMediaData()
```

## Discussion

Apple discourages the use of this symbol in iOS 17, tvOS 17, and macOS 14 and later. Use [`stopRequestingMediaData()`](/documentation/AVFoundation/AVQueuedSampleBufferRendering/stopRequestingMediaData()) on the [`sampleBufferRenderer`](/documentation/AVFoundation/AVSampleBufferDisplayLayer/sampleBufferRenderer) instead.

This method cancels any current [`requestMediaDataWhenReady(on:using:)`](/documentation/AVFoundation/AVSampleBufferDisplayLayer/requestMediaDataWhenReady(on:using:)) call. Each invocation of [`requestMediaDataWhenReady(on:using:)`](/documentation/AVFoundation/AVSampleBufferDisplayLayer/requestMediaDataWhenReady(on:using:)) must be balanced by a call to this method.

This method may be called from within the [`requestMediaDataWhenReady(on:using:)`](/documentation/AVFoundation/AVSampleBufferDisplayLayer/requestMediaDataWhenReady(on:using:)) method’s block or from outside the block.

---

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)