mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-24 17:12:34 +02:00
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:
parent
1b2a925e94
commit
d50f9701b6
@ -597,7 +597,7 @@ static int vt_pixbuf_set_colorspace(void *log_ctx,
|
|||||||
colortrc = av_map_videotoolbox_color_trc_from_av(src->color_trc);
|
colortrc = av_map_videotoolbox_color_trc_from_av(src->color_trc);
|
||||||
if (colortrc)
|
if (colortrc)
|
||||||
CVBufferSetAttachment(pixbuf, kCVImageBufferTransferFunctionKey,
|
CVBufferSetAttachment(pixbuf, kCVImageBufferTransferFunctionKey,
|
||||||
colorpri, kCVAttachmentMode_ShouldPropagate);
|
colortrc, kCVAttachmentMode_ShouldPropagate);
|
||||||
else {
|
else {
|
||||||
CVBufferRemoveAttachment(pixbuf, kCVImageBufferTransferFunctionKey);
|
CVBufferRemoveAttachment(pixbuf, kCVImageBufferTransferFunctionKey);
|
||||||
if (src->color_trc != AVCOL_TRC_UNSPECIFIED)
|
if (src->color_trc != AVCOL_TRC_UNSPECIFIED)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user