summaryrefslogtreecommitdiff
path: root/glamor
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2018-04-17 22:22:21 +0100
committerAdam Jackson <ajax@redhat.com>2018-04-17 17:30:16 -0400
commit12a6b189fb17894d2c3851b70a396bbf41f444c6 (patch)
treec08534cfbef9fec01226242302b8129f783fdeaa /glamor
parentac7a4bf44c68c5f323375974b208d4530fb5b60f (diff)
glamor: fix glamor_xv_query_image_attributes() for odd-width images
Images which are one pixel wider than a multiple of 8 are being handled incorrectly. Other drivers round up the width to a multiple of two before they start calculating. Do the same. https://bugzilla.gnome.org/show_bug.cgi?id=795235 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'glamor')
-rw-r--r--glamor/glamor_xv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c
index e0375d7cd..62fc4fff5 100644
--- a/glamor/glamor_xv.c
+++ b/glamor/glamor_xv.c
@@ -210,6 +210,7 @@ glamor_xv_query_image_attributes(int id,
switch (id) {
case FOURCC_YV12:
case FOURCC_I420:
+ *w = ALIGN(*w, 2);
*h = ALIGN(*h, 2);
size = ALIGN(*w, 4);
if (pitches)