summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Larrosa <antonio.larrosa@gmail.com>2022-03-23 11:27:33 +0100
committerFrediano Ziglio <freddy77@gmail.com>2022-03-23 13:39:52 +0000
commit46e3a57ccd50899342c1688bd7c65f60b4d219f5 (patch)
treecf1f6a005e91632f73a92d5bb71afa2581707d31
parentab9ad87c5f99bed397a6642965e3315d138e7761 (diff)
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 <freddy77@gmail.com>
-rw-r--r--AUTHORS1
-rw-r--r--server/tests/test-gst.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 17979475..c5cf2ecd 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -86,5 +86,6 @@ Patches also contributed by
Hunter Sezen <orbea@riseup.net>
Simon Chopin <simon.chopin@canonical.com>
Geoffrey McRae <geoff@hostfission.com>
+ Antonio Larrosa <antonio.larrosa@gmail.com>
....send patches to get your name here...
diff --git a/server/tests/test-gst.cpp b/server/tests/test-gst.cpp
index 38a20889..066f60a7 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);