summaryrefslogtreecommitdiffstats
path: root/contrib/ffmpeg/A24-videotoolbox-hevc-profile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ffmpeg/A24-videotoolbox-hevc-profile.patch')
-rw-r--r--contrib/ffmpeg/A24-videotoolbox-hevc-profile.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/ffmpeg/A24-videotoolbox-hevc-profile.patch b/contrib/ffmpeg/A24-videotoolbox-hevc-profile.patch
new file mode 100644
index 000000000..4ac11bd55
--- /dev/null
+++ b/contrib/ffmpeg/A24-videotoolbox-hevc-profile.patch
@@ -0,0 +1,26 @@
+diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
+index cc08cf6..eeee196 100644
+--- a/libavcodec/videotoolboxenc.c
++++ b/libavcodec/videotoolboxenc.c
+@@ -1113,15 +1113,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);
+ }
+ }
+