<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 10.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VideoToolbox",
  "identifier" : "/documentation/VideoToolbox/VTDecompressionOutputHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Video Toolbox"
    ],
    "preciseIdentifier" : "c:@T@VTDecompressionOutputHandler"
  },
  "title" : "VTDecompressionOutputHandler"
}
-->

# VTDecompressionOutputHandler

The prototype for the block invoked when frame decompression is complete.

```
typealias VTDecompressionOutputHandler = @Sendable (OSStatus, VTDecodeInfoFlags, CVImageBuffer?, CMTime, CMTime) -> Void
```

## Parameters

`status`

`noErr` if decompression was successful; an error code if decompression was not successful.

`infoFlags`

Information about the decode operation.

    The [`asynchronous`](/documentation/VideoToolbox/VTDecodeInfoFlags/asynchronous)     bit may be set if the decode ran asynchronously.

    The [`frameDropped`](/documentation/VideoToolbox/VTDecodeInfoFlags/frameDropped)     bit may be set if the frame was dropped.

    If the [`imageBufferModifiable`](/documentation/VideoToolbox/VTDecodeInfoFlags/imageBufferModifiable)     bit is set, it is safe for the client to modify the imageBuffer.

`imageBuffer`

The decompressed frame, if decompression was successful; otherwise, `NULL`.
  
  > Important:
  > The video decompressor may still be referencing the `imageBuffer` returned in this callback if the ``doc://com.apple.videotoolbox/documentation/VideoToolbox/VTDecodeInfoFlags/imageBufferModifiable`` flag is not set.  Unless this flag is set, it is not safe to modify the returned `imageBuffer`.

`presentationTimeStamp`

The frame’s presentation timestamp; otherwise, `kCMTimeInvalid` if the timestamp is not available.

`presentationDuration`

The frame’s presentation duration; kCMTimeInvalid if the timestamp is not available.

## Discussion

When you decode a frame, you pass in a callback block to be called for that decompressed frame.  This block is not necessarily called in display order.

---

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)