summaryrefslogtreecommitdiffstats
path: root/contrib/ffmpeg
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2019-02-11 16:40:20 -0500
committerBradley Sepos <[email protected]>2019-02-11 16:40:20 -0500
commite88f7bcd71edb1b47229391ddb1098a0fe6aa763 (patch)
tree4f7aafa460dabc0c070f5cf6cf1e4f4ebd6080ba /contrib/ffmpeg
parent83b065ad9b62c5e60c6ff17a9e71505100567148 (diff)
contrib: Restore FFmpeg VideoToolbox patch.
Mistakenly removed in 66a362ee92331fa1393fbdb0c1e1b26d8f39de6a.
Diffstat (limited to 'contrib/ffmpeg')
-rw-r--r--contrib/ffmpeg/A04-videotoolbox.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/ffmpeg/A04-videotoolbox.patch b/contrib/ffmpeg/A04-videotoolbox.patch
new file mode 100644
index 000000000..387af0d66
--- /dev/null
+++ b/contrib/ffmpeg/A04-videotoolbox.patch
@@ -0,0 +1,27 @@
+diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
+index 7796a68..e8b6245 100644
+--- a/libavcodec/videotoolboxenc.c
++++ b/libavcodec/videotoolboxenc.c
+@@ -866,6 +866,14 @@ static int get_cv_color_primaries(AVCodecContext *avctx,
+ *primaries = NULL;
+ break;
+
++ case AVCOL_PRI_BT470BG:
++ *primaries = kCVImageBufferColorPrimaries_EBU_3213;
++ break;
++
++ case AVCOL_PRI_SMPTE170M:
++ *primaries = kCVImageBufferColorPrimaries_SMPTE_C;
++ break;
++
+ case AVCOL_PRI_BT709:
+ *primaries = kCVImageBufferColorPrimaries_ITU_R_709_2;
+ break;
+@@ -1302,6 +1310,7 @@ static av_cold int vtenc_init(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;
+ }
+
+ vtctx->session = NULL;