mirror of https://github.com/mpv-player/mpv
vo_vaapi: potentially fix screenshot colorspace issues
mp_image_set_params() doesn't check whether the colorspace parameters are consistent (e.g. setting YUV colorspaces with RGB formats), and shouldn't need to.
This commit is contained in:
parent
402f85f7f2
commit
086b37a830
|
@ -654,6 +654,7 @@ static struct mp_image *get_screenshot(struct priv *p)
|
||||||
return NULL;
|
return NULL;
|
||||||
struct mp_image_params params = p->image_params;
|
struct mp_image_params params = p->image_params;
|
||||||
params.imgfmt = img->imgfmt;
|
params.imgfmt = img->imgfmt;
|
||||||
|
mp_image_params_guess_csp(¶ms); // ensure colorspace consistency
|
||||||
mp_image_set_params(img, ¶ms);
|
mp_image_set_params(img, ¶ms);
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue