mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
ci: Fix compile error using new GStreamer library
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>
This commit is contained in:
parent
cf061597b6
commit
b24e2ea68e
@ -991,7 +991,7 @@ static gboolean create_pipeline(SpiceGstEncoder *encoder)
|
||||
#ifdef HAVE_GSTREAMER_0_10
|
||||
GstAppSinkCallbacks appsink_cbs = {NULL, NULL, &new_sample, NULL, {NULL}};
|
||||
#else
|
||||
GstAppSinkCallbacks appsink_cbs = {NULL, NULL, &new_sample, {NULL}};
|
||||
GstAppSinkCallbacks appsink_cbs = {NULL, NULL, &new_sample, ._gst_reserved={NULL}};
|
||||
#endif
|
||||
gst_app_sink_set_callbacks(encoder->appsink, &appsink_cbs, encoder, NULL);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user