summaryrefslogtreecommitdiffstats
path: root/sub/draw_bmp.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-04-10 21:06:18 +0200
committerwm4 <wm4@nowhere>2015-04-10 21:06:25 +0200
commit37a71e57d404a708505f920f610061ec5c424917 (patch)
tree000ad1e9657175bd2fc9c8a77795d0f8abc8e766 /sub/draw_bmp.c
parent41151122e73f82d0bc9a806c80165878e930dc07 (diff)
downloadmpv-37a71e57d404a708505f920f610061ec5c424917.tar.bz2
mpv-37a71e57d404a708505f920f610061ec5c424917.tar.xz
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.
Diffstat (limited to 'sub/draw_bmp.c')
-rw-r--r--sub/draw_bmp.c4
1 files changed, 2 insertions, 2 deletions
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;
}