diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-10-09 09:31:27 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2020-10-09 09:31:27 +0300 |
commit | 6a84dc41460fcf49920fc8cb41b4c8e0b079854a (patch) | |
tree | 5d565b719142ae3856f5eb2aa22248727c08521e /gst | |
parent | ed2b5e6cfc363b483df9975d972ebf2a3f57ccc2 (diff) |
rtpst2022-1-fecenc: Don't unconditionally use GLib 2.60 APIs
g_queue_clear_full() in this case.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/768>
Diffstat (limited to 'gst')
-rw-r--r-- | gst/rtpmanager/gstrtpst2022-1-fecenc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpst2022-1-fecenc.c b/gst/rtpmanager/gstrtpst2022-1-fecenc.c index a93f4186a..98cf42eb8 100644 --- a/gst/rtpmanager/gstrtpst2022-1-fecenc.c +++ b/gst/rtpmanager/gstrtpst2022-1-fecenc.c @@ -70,6 +70,18 @@ #include "gstrtpst2022-1-fecenc.h" +#if !GLIB_CHECK_VERSION(2, 60, 0) +#define g_queue_clear_full queue_clear_full +static void +queue_clear_full (GQueue * queue, GDestroyNotify free_func) +{ + gpointer data; + + while ((data = g_queue_pop_head (queue)) != NULL) + free_func (data); +} +#endif + GST_DEBUG_CATEGORY_STATIC (gst_rtpst_2022_1_fecenc_debug); #define GST_CAT_DEFAULT gst_rtpst_2022_1_fecenc_debug |