fix: availability warnings

This commit is contained in:
Acaki
2025-08-15 01:18:03 +08:00
parent 73316ab5b8
commit 0d32b8f06f
4 changed files with 72 additions and 36 deletions
+9 -6
View File
@@ -204,12 +204,15 @@ extern int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size,
}
#endif
NSDictionary *destinationPixelBufferAttributes = @{
(id)kCVPixelBufferPixelFormatTypeKey : pixelFormat,
(id)kVTDecompressionPropertyKey_GeneratePerFrameHDRDisplayMetadata : @YES,
(id)kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder : @YES
};
NSMutableDictionary *destinationPixelBufferAttributes = [@{
(id)kCVPixelBufferPixelFormatTypeKey : pixelFormat
} mutableCopy];
if (@available(iOS 17.0, tvOS 17.0, *)) {
destinationPixelBufferAttributes[(id)kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder] = @YES;
destinationPixelBufferAttributes[(id)kVTDecompressionPropertyKey_GeneratePerFrameHDRDisplayMetadata] = @YES;
}
return [self setupDecompressionSessionWithAttributes:destinationPixelBufferAttributes];
}