From 37a71e57d404a708505f920f610061ec5c424917 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 10 Apr 2015 21:06:18 +0200 Subject: mp_image: remove redundant flags field Because gcc (and clang) is a goddamn PITA and unnecessarily warns if the universal initializer for structs is used (like mp_image x = {}) and the first member of the struct is also a struct, move the w/h fields to the top. --- sub/draw_bmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sub') diff --git a/sub/draw_bmp.c b/sub/draw_bmp.c index 78fb33ca9f..7a60215dba 100644 --- a/sub/draw_bmp.c +++ b/sub/draw_bmp.c @@ -295,7 +295,7 @@ static void draw_ass(struct mp_draw_sub_cache *cache, struct mp_rect bb, cspar.int_bits_out = 8; struct mp_cmat yuv2rgb, rgb2yuv; - bool need_conv = temp->flags & MP_IMGFLAG_YUV; + bool need_conv = temp->fmt.flags & MP_IMGFLAG_YUV; if (need_conv) { mp_get_yuv2rgb_coeffs(&cspar, &yuv2rgb); mp_invert_yuv2rgb(&rgb2yuv, &yuv2rgb); @@ -470,7 +470,7 @@ static struct mp_image *chroma_up(struct mp_draw_sub_cache *cache, int imgfmt, // The temp image is always YUV, but src not necessarily. // Reduce amount of conversions in YUV case (upsampling/shifting only) - if (src->flags & MP_IMGFLAG_YUV) { + if (src->fmt.flags & MP_IMGFLAG_YUV) { temp->params.colorspace = src->params.colorspace; temp->params.colorlevels = src->params.colorlevels; } -- cgit v1.2.3