[FFmpeg-cvslog] lavc/videotoolbox: fix build on pre-10.14 SDKs
rcombs
git at videolan.org
Mon Nov 29 01:16:15 EET 2021
ffmpeg | branch: master | rcombs <rcombs at rcombs.me> | Sun Nov 28 17:15:34 2021 -0600| [c7e527f7f395f23d6b41e54c21cd50b110f83f82] | committer: rcombs
lavc/videotoolbox: fix build on pre-10.14 SDKs
Also fixes handling of future codec tags (needed to bswap)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c7e527f7f395f23d6b41e54c21cd50b110f83f82
---
libavcodec/videotoolbox.c | 26 +++++++-------------------
1 file changed, 7 insertions(+), 19 deletions(-)
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 40d231acc1..d2907aee56 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -875,27 +875,15 @@ static int videotoolbox_start(AVCodecContext *avctx)
break;
case AV_CODEC_ID_PRORES :
switch (avctx->codec_tag) {
- case MKTAG('a','p','c','o'):
- videotoolbox->cm_codec_type = kCMVideoCodecType_AppleProRes422Proxy;
- break;
- case MKTAG('a','p','c','s'):
- videotoolbox->cm_codec_type = kCMVideoCodecType_AppleProRes422LT;
- break;
- case MKTAG('a','p','c','n'):
- videotoolbox->cm_codec_type = kCMVideoCodecType_AppleProRes422;
- break;
- case MKTAG('a','p','c','h'):
- videotoolbox->cm_codec_type = kCMVideoCodecType_AppleProRes422HQ;
- break;
- case MKTAG('a','p','4','h'):
- videotoolbox->cm_codec_type = kCMVideoCodecType_AppleProRes4444;
- break;
- case MKTAG('a','p','4','x'):
- videotoolbox->cm_codec_type = kCMVideoCodecType_AppleProRes4444XQ;
- break;
default:
- videotoolbox->cm_codec_type = avctx->codec_tag;
av_log(avctx, AV_LOG_WARNING, "Unknown prores profile %d\n", avctx->codec_tag);
+ case MKTAG('a','p','c','o'): // kCMVideoCodecType_AppleProRes422Proxy
+ case MKTAG('a','p','c','s'): // kCMVideoCodecType_AppleProRes422LT
+ case MKTAG('a','p','c','n'): // kCMVideoCodecType_AppleProRes422
+ case MKTAG('a','p','c','h'): // kCMVideoCodecType_AppleProRes422HQ
+ case MKTAG('a','p','4','h'): // kCMVideoCodecType_AppleProRes4444
+ case MKTAG('a','p','4','x'): // kCMVideoCodecType_AppleProRes4444XQ
+ videotoolbox->cm_codec_type = av_bswap32(avctx->codec_tag);
}
break;
case AV_CODEC_ID_VP9 :
More information about the ffmpeg-cvslog
mailing list