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
0a657d6db5
)

Acked-by: Frediano Ziglio <freddy77@gmail.com>
This commit is contained in:
Antonio Larrosa 2022-03-23 11:27:33 +01:00 committed by Frediano Ziglio
parent ab9ad87c5f
commit 46e3a57ccd
2 changed files with 5 additions and 0 deletions

View File

@ -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...

View File

@ -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);