From 46e3a57ccd50899342c1688bd7c65f60b4d219f5 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Wed, 23 Mar 2022 11:27:33 +0100 Subject: [PATCH] Fix build with gstreamer 1.20.x gstreamer-plugins-base 1.20 includes a new member in the GstAppSinkCallbacks struct: gboolean (*new_event) (GstAppSink *appsink, gpointer user_data); So it has to be initialized in order to build test-gst.cpp successfully. (added in https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/0a657d6db5ba912b13092a907ea507638cd01cf9 ) Acked-by: Frediano Ziglio --- server/tests/test-gst.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/server/tests/test-gst.cpp b/server/tests/test-gst.cpp index 38a2088..066f60a 100644 --- a/server/tests/test-gst.cpp +++ b/server/tests/test-gst.cpp @@ -614,7 +614,11 @@ create_pipeline(const char *desc, SampleProc sample_proc, void *param) } static const GstAppSinkCallbacks appsink_cbs_template = +#if GST_CHECK_VERSION(1, 20, 0) + { NULL, NULL, new_sample, NULL, ._gst_reserved={NULL} }; +#else { NULL, NULL, new_sample, ._gst_reserved={NULL} }; +#endif GstAppSinkCallbacks appsink_cbs = appsink_cbs_template; gst_app_sink_set_callbacks(pipeline->appsink, &appsink_cbs, pipeline, NULL); -- libgit2 1.3.0