mirror of
https://github.com/mpv-player/mpv
synced 2025-02-19 14:26:57 +00:00
video/image_writer: avoid stripping colorspace info when writing image
Writing an image either with vo_image or with a screenshot will strip the colorspace info because it allocates a new mp_image that contains the same data as the old image after calling mp_image_params_guess_csp. However, mp_image_params_guess_csp cannot always guess the appropriate colorspace, so it picks a "sane default." Since this function also changes parameters so the space always makes sense, this extra info isn't harmful and allows screenshots and vo_image outs to be properly tagged with the correct colorspace. Fixes #10988.
This commit is contained in:
parent
88918411f3
commit
7990dd8f3f
@ -355,6 +355,7 @@ static struct mp_image *convert_image(struct mp_image *image, int destfmt,
|
||||
.h = d_h,
|
||||
.p_w = 1,
|
||||
.p_h = 1,
|
||||
.color = image->params.color,
|
||||
};
|
||||
mp_image_params_guess_csp(&p);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user