summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-16 11:38:16 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-01-18 00:59:07 -0800
commit7533d3c3a80cb2205d64c343d2c0987f5b2a2e7e (patch)
treed160f4a3b24c698bb4706c548b4f3528951d33e8
parent2115e2306e8d7b5dcae452aa2dff37287ba4de48 (diff)
downloadmpv-7533d3c3a80cb2205d64c343d2c0987f5b2a2e7e.tar.bz2
mpv-7533d3c3a80cb2205d64c343d2c0987f5b2a2e7e.tar.xz
video: make IMGFMT_IS_HWACCEL() return 0 or 1
Sometimes helps avoiding usage mistakes.
-rw-r--r--video/img_format.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/img_format.h b/video/img_format.h
index c8f60f0414..8f90682325 100644
--- a/video/img_format.h
+++ b/video/img_format.h
@@ -231,7 +231,7 @@ static inline bool IMGFMT_IS_RGB(int fmt)
}
#define IMGFMT_RGB_DEPTH(fmt) (mp_imgfmt_get_desc(fmt).plane_bits)
-#define IMGFMT_IS_HWACCEL(fmt) (mp_imgfmt_get_desc(fmt).flags & MP_IMGFLAG_HWACCEL)
+#define IMGFMT_IS_HWACCEL(fmt) (!!(mp_imgfmt_get_desc(fmt).flags & MP_IMGFLAG_HWACCEL))
int mp_imgfmt_from_name(bstr name);
char *mp_imgfmt_to_name_buf(char *buf, size_t buf_size, int fmt);