[FFmpeg-cvslog] avutil/hwcontext_videotoolbox: Correctly set trc

Gnattu OC git at videolan.org
Fri Aug 2 05:26:30 EEST 2024


ffmpeg | branch: master | Gnattu OC <gnattuoc at me.com> | Fri Aug  2 07:31:03 2024 +0800| [d50f9701b63a7270922ed754a720fe76e80c0bed] | committer: Zhao Zhili

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 at me.com>
Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d50f9701b63a7270922ed754a720fe76e80c0bed
---

 libavutil/hwcontext_videotoolbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c
index 1794459943..80eaab64f0 100644
--- a/libavutil/hwcontext_videotoolbox.c
+++ b/libavutil/hwcontext_videotoolbox.c
@@ -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)



More information about the ffmpeg-cvslog mailing list