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>
dev
Daniel Stone 3 years ago
parent 18d9ad98b1
commit b25f8aebf5
  1. 7
      remoting/remoting-plugin.c

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

Loading…
Cancel
Save