summaryrefslogtreecommitdiff
path: root/libavcodec/videotoolbox.c
diff options
context:
space:
mode:
authorrcombs <rcombs@rcombs.me>2021-11-13 02:33:08 -0600
committerrcombs <rcombs@rcombs.me>2021-11-28 16:40:44 -0600
commite3c6cc96cf2f0b2c22dee80a53a01a5fe4fea009 (patch)
tree35f366d9da2d8ac035ad1e61a70c89f873e37beb /libavcodec/videotoolbox.c
parent530c4a7ea95102a806db0ba3d6fcd773fe02806b (diff)
lavc/videotoolbox: call VTRegisterSupplementalVideoDecoderIfAvailable
This is required for VP9 to work.
Diffstat (limited to 'libavcodec/videotoolbox.c')
-rw-r--r--libavcodec/videotoolbox.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 3022cd1cbf..a11d494915 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -32,6 +32,7 @@
#include "h264dec.h"
#include "hevcdec.h"
#include "mpegvideo.h"
+#include <Availability.h>
#include <TargetConditionals.h>
#ifndef kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder
@@ -866,6 +867,12 @@ static int videotoolbox_start(AVCodecContext *avctx)
break;
}
+#ifdef __MAC_10_11
+ if (__builtin_available(macOS 10.11, *)) {
+ VTRegisterSupplementalVideoDecoderIfAvailable(videotoolbox->cm_codec_type);
+ }
+#endif
+
decoder_spec = videotoolbox_decoder_config_create(videotoolbox->cm_codec_type, avctx);
if (!decoder_spec) {