diff options
author | Gnattu OC <gnattuoc@me.com> | 2024-08-02 07:31:03 +0800 |
---|---|---|
committer | Zhao Zhili <zhilizhao@tencent.com> | 2024-08-02 10:24:09 +0800 |
commit | d50f9701b63a7270922ed754a720fe76e80c0bed (patch) | |
tree | 25d434b445243e24125576cda58f2926e7f7e9c9 | |
parent | 1b2a925e94c772c59a88c03c1654bddf6aff0ca2 (diff) | |
download | ffmpeg-d50f9701b63a7270922ed754a720fe76e80c0bed.tar.gz |
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>
-rw-r--r-- | libavutil/hwcontext_videotoolbox.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |