d8a271c0
by Brendan McGrath at 2025-05-07T12:45:29-05:00
winegstreamer: Only align the first plane in gst_video_info_align.
This ensures that the stride calculation performed by gst_video_info_align
matches the result in wg_format_get_stride. Otherwise, we can get a size
mismatch which will result in a STATUS_BUFFER_TOO_SMALL error.
This affected formats where not all planes had the same stride.
For example: I420, YV12, etc (where the 'U' and 'V' planes are
horizontally subsampled and stored in their own plane).
The error would occur if half the aligned primary plane stride was not also on
the desired alignment. For example: a width of 1828 would be padded to 1840
(aligned to the next multiple of 16), but half of this is 920 which is not
a multiple of 16. Hence gst_video_info_align was adding additional padding
to also align that, which is 928. The result would be a stride of 1856 for
the primary plane, whilst wg_format_get_stride would stay with the
original value of 1840.