From 0076671e24670f1ddb151946e490497f171589f0 Mon Sep 17 00:00:00 2001 From: Jeffy Chen Date: Fri, 8 Nov 2019 15:44:41 +0800 Subject: [PATCH] glamor: xv: Fix invalid accessing of plane attributes for NV12 NV12 only has 2 planes. Signed-off-by: Jeffy Chen --- glamor/glamor_xv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c index 3467af86f..1548f8079 100644 --- a/glamor/glamor_xv.c +++ b/glamor/glamor_xv.c @@ -291,10 +291,10 @@ glamor_xv_query_image_attributes(int id, pitches[0] = size; size *= *h; if (offsets) - offsets[1] = offsets[2] = size; + offsets[1] = size; tmp = ALIGN(*w, 4); if (pitches) - pitches[1] = pitches[2] = tmp; + pitches[1] = tmp; tmp *= (*h >> 1); size += tmp; break;