On Thu, Jul 15, 2021 at 12:47 AM Hao Guan <hgua...@gmail.com> wrote: > --- > libavcodec/videotoolboxenc.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c > index 4eaabed5d8..61eb6e1921 100644 > --- a/libavcodec/videotoolboxenc.c > +++ b/libavcodec/videotoolboxenc.c > @@ -990,6 +990,10 @@ static int get_cv_transfer_function(AVCodecContext > *avctx, > *gamma_level = CFNumberCreate(NULL, kCFNumberFloat32Type, > &gamma); > break; > > + case AVCOL_TRC_IEC61966_2_1: > + *transfer_fnc = kCVImageBufferTransferFunction_sRGB; > + break; > + > kCVImageBufferTransferFunction_sRGB is only available starting in iOS 11 and MacOS 10.13, so this will cause a build error for old OS's. This should be added to compat_keys and accessed from there.
case AVCOL_TRC_BT2020_10: > case AVCOL_TRC_BT2020_12: > *transfer_fnc = > compat_keys.kCVImageBufferTransferFunction_ITU_R_2020; > -- > 2.30.1 (Apple Git-130) > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".