avutil/hwcontext_videotoolbox: Correctly set trc

The color trc key was assigned a color primaries value which causes
the resulting colorspace is always SDR.

Fixes #10884.

Signed-off-by: Gnattu OC <gnattuoc@me.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
Gnattu OC 2024-08-02 07:31:03 +08:00 committed by Zhao Zhili
parent 1b2a925e94
commit d50f9701b6
1 changed files with 1 additions and 1 deletions

View File

@ -597,7 +597,7 @@ static int vt_pixbuf_set_colorspace(void *log_ctx,
colortrc = av_map_videotoolbox_color_trc_from_av(src->color_trc);
if (colortrc)
CVBufferSetAttachment(pixbuf, kCVImageBufferTransferFunctionKey,
colorpri, kCVAttachmentMode_ShouldPropagate);
colortrc, kCVAttachmentMode_ShouldPropagate);
else {
CVBufferRemoveAttachment(pixbuf, kCVImageBufferTransferFunctionKey);
if (src->color_trc != AVCOL_TRC_UNSPECIFIED)