glamor: xv: Fix invalid accessing of plane attributes for NV12

NV12 only has 2 planes.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
Jeffy Chen 2019-11-08 15:44:41 +08:00 committed by Emma Anholt
parent 6fa9da0431
commit 0076671e24

View File

@ -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;