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:
parent
6fa9da0431
commit
0076671e24
|
@ -291,10 +291,10 @@ glamor_xv_query_image_attributes(int id,
|
||||||
pitches[0] = size;
|
pitches[0] = size;
|
||||||
size *= *h;
|
size *= *h;
|
||||||
if (offsets)
|
if (offsets)
|
||||||
offsets[1] = offsets[2] = size;
|
offsets[1] = size;
|
||||||
tmp = ALIGN(*w, 4);
|
tmp = ALIGN(*w, 4);
|
||||||
if (pitches)
|
if (pitches)
|
||||||
pitches[1] = pitches[2] = tmp;
|
pitches[1] = tmp;
|
||||||
tmp *= (*h >> 1);
|
tmp *= (*h >> 1);
|
||||||
size += tmp;
|
size += tmp;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue