aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrcombs <rcombs@rcombs.me>2021-11-28 17:15:34 -0600
committerrcombs <rcombs@rcombs.me>2021-11-28 17:15:36 -0600
commitc7e527f7f395f23d6b41e54c21cd50b110f83f82 (patch)
tree8562b75ced5ddf8d2bb5ac841169f8b34ba21d82
parent4cedf44aae273df937daf81b7b798539e880b20f (diff)
downloadffmpeg-c7e527f7f395f23d6b41e54c21cd50b110f83f82.tar.gz
lavc/videotoolbox: fix build on pre-10.14 SDKs
Also fixes handling of future codec tags (needed to bswap)
-rw-r--r--libavcodec/videotoolbox.c26
1 files 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 :