[FFmpeg-devel] [PATCH 11/15] lavc/videotoolbox: call VTRegisterSupplementalVideoDecoderIfAvailable

rcombs rcombs at rcombs.me
Sat Nov 13 23:09:12 EET 2021


This is required for VP9 to work.
---
 libavcodec/videotoolbox.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 18cc589d2a..0666446dbd 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
@@ -864,6 +865,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) {
-- 
2.33.1



More information about the ffmpeg-devel mailing list