Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37749249
en ru br
ALT Linux repos
S:0.15.2-alt1

Group :: Graphical desktop/Other
RPM: SPICE

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0005-ci-Fix-compile-error-using-new-GStreamer-library.patch
Download


From b24e2ea68e34a1b00298d818af594f656d4bdf47 Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <freddy77@gmail.com>
Date: Wed, 10 Nov 2021 14:21:08 +0000
Subject: [PATCH] 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>
---
 server/gstreamer-encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c
index 973a5f3..5ea11f4 100644
--- a/server/gstreamer-encoder.c
+++ b/server/gstreamer-encoder.c
@@ -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);
 
--
libgit2 1.3.0
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin