remoting: Fix warnings for multi-planar interface

GStreamer can accept up to four planes for a buffer; gcc isn't _quite_
smart enough to figure out that only the first plane of offset/stride
will be accessed and so throws a warning that the params are too small.
Fix that by making them arrays.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2021-11-18 14:54:25 +00:00
parent 18d9ad98b1
commit b25f8aebf5

View file

@ -572,7 +572,8 @@ remoting_output_frame(struct weston_output *output_base, int fd, int stride,
struct wl_event_loop *loop;
GstBuffer *buf;
GstMemory *mem;
gsize offset = 0;
gsize offsets[4] = { 0, };
gint strides[4] = { stride, };
struct mem_free_cb_data *cb_data;
struct gst_frame_buffer_data *frame_data;
@ -594,8 +595,8 @@ remoting_output_frame(struct weston_output *output_base, int fd, int stride,
mode->width,
mode->height,
1,
&offset,
&stride);
offsets,
strides);
cb_data->output = output;
cb_data->output_buffer = output_buffer;