vo_gpu_next: fix UB in query_format()

`plane_data_from_imgfmt` doesn't zero-initialize the struct, so this
contained invalid values for e.g. `row_stride`, causing formats to
*randomly* fail. (Especially any formats with specific alignment
requirements)

Might fix #9424 and #9425.
This commit is contained in:
Niklas Haas 2021-12-05 21:24:57 +01:00
parent fc94c8c365
commit 036bda9166
1 changed files with 1 additions and 1 deletions

View File

@ -820,7 +820,7 @@ static int query_format(struct vo *vo, int format)
{
struct priv *p = vo->priv;
struct pl_bit_encoding bits;
struct pl_plane_data data[4];
struct pl_plane_data data[4] = {0};
int planes = plane_data_from_imgfmt(data, &bits, format);
if (!planes)
return false;