Skip to content

ci: Fix compile error using new GStreamer library

Frediano Ziglio requested to merge fziglio/spice:fix_ci into master

Using Fedora 35 the compilation fails due to this warning:

../server/gstreamer-encoder.c: In function 'create_pipeline':
../server/gstreamer-encoder.c:994:5: error: braces around scalar initializer [-Werror]
 994 |     GstAppSinkCallbacks appsink_cbs = {NULL, NULL, &new_sample, {NULL}};
     |     ^~~~~~~~~~~~~~~~~~~
../server/gstreamer-encoder.c:994:5: note: (near initialization for 'appsink_cbs.new_event')
../server/gstreamer-encoder.c:994:5: error: missing initializer for field '_gst_reserved' of 'GstAppSinkCallbacks' [-Werror=missing-field-initializers]
In file included from ../server/gstreamer-encoder.c:26:
/usr/include/gstreamer-1.0/gst/app/gstappsink.h:81:16: note: '_gst_reserved' declared here
   81 |   gpointer     _gst_reserved[GST_PADDING - 1];
      |                ^~~~~~~~~~~~~
cc1: all warnings being treated as errors

Change structure initialisation to avoid the warning. The same syntax is already used in server/tests/test-gst.cpp.

Signed-off-by: Frediano Ziglio freddy77@gmail.com

Merge request reports