mirror of https://github.com/mpv-player/mpv
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:
parent
fc94c8c365
commit
036bda9166
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue