From c789a2324a6578568db947b6bf10c2dfd0011bef Mon Sep 17 00:00:00 2001 From: Rick Kern Date: Fri, 19 May 2023 09:48:26 -0400 Subject: [PATCH] lavc/videotoolboxenc: better compat_keys documentation Added documentation that describes when compat_keys should be used, and why it exists. Signed-off-by: Rick Kern --- libavcodec/videotoolboxenc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index e91d17c132..b0297ec448 100644 --- a/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c @@ -63,7 +63,11 @@ typedef OSStatus (*getParameterSetAtIndex)(CMFormatDescriptionRef videoDesc, size_t *parameterSetCountOut, int *NALUnitHeaderLengthOut); -//These symbols may not be present +/* + * Keys that are not present in all versions of VideoToolbox need to be + * accessed from compat_keys, or it will cause compiler errors when compiling + * for older OS versions. + */ static struct{ CFStringRef kCVImageBufferColorPrimaries_ITU_R_2020; CFStringRef kCVImageBufferTransferFunction_ITU_R_2020;