mac-videotoolbox: Remove guard for hardware acceleration check

This commit is contained in:
PatTheMav 2022-07-28 20:25:58 +02:00 committed by Patrick Heyer
parent 297ec9e957
commit a001f97e3c

View file

@ -1086,15 +1086,13 @@ bool obs_module_load(void)
VT_DICTSTR(kVTVideoEncoderList_EncoderID, id);
VT_DICTSTR(kVTVideoEncoderList_DisplayName, disp_name);
bool hardware_accelerated = false;
if (__builtin_available(macOS 10.14, *)) {
CFBooleanRef hardware_ref = CFDictionaryGetValue(
encoder_dict,
kVTVideoEncoderList_IsHardwareAccelerated);
if (hardware_ref)
hardware_accelerated =
CFBooleanGetValue(hardware_ref);
}
CFBooleanRef hardware_ref = CFDictionaryGetValue(
encoder_dict,
kVTVideoEncoderList_IsHardwareAccelerated);
bool hardware_accelerated =
(hardware_ref) ? CFBooleanGetValue(hardware_ref)
: false;
info.id = id;
struct vt_encoder_type_data *type_data =