mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Codec (macOS): fixes a symbol not found error when running on 10.15
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
#include <VideoToolbox/VideoToolbox.h>
|
||||
#include "common/apple/cf_helpers.h"
|
||||
|
||||
#ifdef MAC_OS_VERSION_11_0
|
||||
[[clang::weak_import]] VT_EXPORT void VTRegisterSupplementalVideoDecoderIfAvailable(CMVideoCodecType codecType);
|
||||
#endif
|
||||
|
||||
static const struct {
|
||||
CMVideoCodecType codec;
|
||||
FFCodecType type;
|
||||
@@ -70,9 +74,11 @@ static FFCodecType ffCodecDetectDecoders() {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (__builtin_available(macOS 11.0, *)) {
|
||||
#ifdef MAC_OS_VERSION_11_0
|
||||
if (VTRegisterSupplementalVideoDecoderIfAvailable) {
|
||||
VTRegisterSupplementalVideoDecoderIfAvailable(codec.codec);
|
||||
}
|
||||
#endif
|
||||
bool supported = VTIsHardwareDecodeSupported(codec.codec);
|
||||
if (!supported) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user