summaryrefslogtreecommitdiff
path: root/libavcodec/videotoolboxenc.c
diff options
context:
space:
mode:
authorHarry Mallon <harry.mallon@codex.online>2020-09-21 12:16:58 +0100
committerRick Kern <kernrj@gmail.com>2020-09-28 20:46:05 -0400
commit80384a6ec3074aeb27dfbd28cebd614c6fc72ce7 (patch)
tree357b63c9f0cff65af63178af522076235455dc53 /libavcodec/videotoolboxenc.c
parentddf2ba54979387740b0b2fb319bb5a2c9f78debe (diff)
avcodec/videotoolboxenc: Set profile (main/main10) on HEVC encode
Signed-off-by: Harry Mallon <harry.mallon@codex.online> Signed-off-by: Rick Kern <kernrj@gmail.com>
Diffstat (limited to 'libavcodec/videotoolboxenc.c')
-rw-r--r--libavcodec/videotoolboxenc.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index e89cfaeed8..212f41b19a 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -1114,15 +1114,12 @@ static int vtenc_create_encoder(AVCodecContext *avctx,
}
}
- if (vtctx->codec_id == AV_CODEC_ID_H264) {
- // kVTCompressionPropertyKey_ProfileLevel is not available for HEVC
- if (profile_level) {
- status = VTSessionSetProperty(vtctx->session,
- kVTCompressionPropertyKey_ProfileLevel,
- profile_level);
- if (status) {
- av_log(avctx, AV_LOG_ERROR, "Error setting profile/level property: %d. Output will be encoded using a supported profile/level combination.\n", status);
- }
+ if (profile_level) {
+ status = VTSessionSetProperty(vtctx->session,
+ kVTCompressionPropertyKey_ProfileLevel,
+ profile_level);
+ if (status) {
+ av_log(avctx, AV_LOG_ERROR, "Error setting profile/level property: %d. Output will be encoded using a supported profile/level combination.\n", status);
}
}