Add guards around AV1 checks

This commit is contained in:
Cameron Gutman
2023-11-04 01:08:56 -05:00
parent ce25a66dc5
commit 75a7b9e477
2 changed files with 8 additions and 1 deletions

View File

@@ -200,7 +200,10 @@ BOOL isCustomResolution(CGSize res) {
}
// Disable codec selector segments for unsupported codecs
if (!VTIsHardwareDecodeSupported(kCMVideoCodecType_AV1)) {
#if defined(__IPHONE_16_0) || defined(__TVOS_16_0)
if (!VTIsHardwareDecodeSupported(kCMVideoCodecType_AV1))
#endif
{
[self.codecSelector setEnabled:NO forSegmentAtIndex:2];
}
if (!VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC)) {