summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2020-08-25 13:44:27 +0200
committerDamiano Galassi <[email protected]>2020-08-25 13:44:27 +0200
commit36246b5a32ba8dfaff17fd925ad8f438e3df89ea (patch)
tree11823f29f3326d37ffbff3f139aff473cfff4bf6 /contrib
parent5f2fbdbbcbf845511105191d2f2980a18e5cf2e6 (diff)
contrib: add back patch to enable b-frames in hevc videotoolbox encoder.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ffmpeg/A04-videotoolbox-hevc-bframes.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/ffmpeg/A04-videotoolbox-hevc-bframes.patch b/contrib/ffmpeg/A04-videotoolbox-hevc-bframes.patch
new file mode 100644
index 000000000..643cf0446
--- /dev/null
+++ b/contrib/ffmpeg/A04-videotoolbox-hevc-bframes.patch
@@ -0,0 +1,12 @@
+diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
+index cc08cf6..32d893e 100644
+--- a/libavcodec/videotoolboxenc.c
++++ b/libavcodec/videotoolboxenc.c
+@@ -1355,6 +1355,7 @@ static int vtenc_configure_encoder(AVCodecContext *avctx)
+ vtctx->get_param_set_func = compat_keys.CMVideoFormatDescriptionGetHEVCParameterSetAtIndex;
+ if (!vtctx->get_param_set_func) return AVERROR(EINVAL);
+ if (!get_vt_hevc_profile_level(avctx, &profile_level)) return AVERROR(EINVAL);
++ vtctx->has_b_frames = avctx->max_b_frames > 0;
+ }
+
+ enc_info = CFDictionaryCreateMutable(