mirror of
https://github.com/mpv-player/mpv
synced 2025-01-11 09:29:29 +00:00
sub: don't crash on GBRP video
mp_get_yuv2rgb_coeffs() will crash if the colorspace is explicitly set to RGB.
This commit is contained in:
parent
6ef06aa145
commit
f6a68063ba
@ -287,8 +287,10 @@ static void draw_ass(struct mp_draw_sub_cache *cache, struct mp_rect bb,
|
||||
cspar.int_bits_out = 8;
|
||||
|
||||
float yuv2rgb[3][4], rgb2yuv[3][4];
|
||||
mp_get_yuv2rgb_coeffs(&cspar, yuv2rgb);
|
||||
mp_invert_yuv2rgb(rgb2yuv, yuv2rgb);
|
||||
if (temp->flags & MP_IMGFLAG_YUV) {
|
||||
mp_get_yuv2rgb_coeffs(&cspar, yuv2rgb);
|
||||
mp_invert_yuv2rgb(rgb2yuv, yuv2rgb);
|
||||
}
|
||||
|
||||
for (int i = 0; i < sbs->num_parts; ++i) {
|
||||
struct sub_bitmap *sb = &sbs->parts[i];
|
||||
|
Loading…
Reference in New Issue
Block a user